Manuel Friedli
17d53d28cb
- in sonar-4.x, thw web-direcotry is called web, not war - enewgroup and enewuser requires the "user" eclass
33 lines
480 B
Bash
33 lines
480 B
Bash
#!/sbin/runscript
|
|
|
|
depend() {
|
|
need net
|
|
use dns logger
|
|
}
|
|
|
|
RUN_AS=sonar
|
|
|
|
MACHINE_TYPE=`getconf LONG_BIT`
|
|
if [ "${MACHINE_TYPE}" = "64" ]; then
|
|
JSW=/opt/sonar/bin/linux-x86-64/sonar.sh
|
|
else
|
|
JSW=/opt/sonar/bin/linux-x86-32/sonar.sh
|
|
fi
|
|
|
|
checkconfig() {
|
|
return 0
|
|
}
|
|
|
|
start() {
|
|
checkconfig || return 1
|
|
|
|
ebegin "Starting ${SVCNAME}"
|
|
su $RUN_AS -c "$JSW start"
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping ${SVCNAME}"
|
|
su $RUN_AS -c "$JSW stop"
|
|
eend $?
|
|
}
|