gentoo-overlay/dev-util/sonar-bin/files/init.sh
Manuel Friedli 17d53d28cb added fixed ebuild (copied from godin's overlay):
- in sonar-4.x, thw web-direcotry is called web, not war
- enewgroup and enewuser requires the "user" eclass
2014-02-24 18:19:06 +01:00

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 $?
}