gentoo-overlay/dev-java/nexus-oss-bin/files/init.sh

27 lines
381 B
Bash
Raw Normal View History

#!/sbin/runscript
depend() {
need net
use dns logger
}
RUN_AS=nexus
checkconfig() {
return 0
}
start() {
checkconfig || return 1
ebegin "Starting ${SVCNAME}"
su $RUN_AS -c "/opt/nexus/nexus-oss-webapp/bin/nexus start"
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
su $RUN_AS -c "/opt/nexus/nexus-oss-webapp/bin/nexus stop"
eend $?
}