You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-text/gonzui/files/gonzui.initd

36 lines
871 B

#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/gonzui/files/gonzui.initd,v 1.1 2011/01/15 01:55:39 matsuu Exp $
GONZUI_SERVER="/usr/bin/gonzui-server"
GONZUIRC="/etc/gonzuirc"
GONZUI_PIDFILE="/var/run/gonzui.pid"
depend() {
need net
}
checkconfig() {
if [ ! -f "$GONZUIRC" ] ; then
eerror "Please create $GONZUIRC"
return 1
fi
return 0
}
start() {
checkconfig || return $?
ebegin "Starting gonzui"
start-stop-daemon --start --quiet --pidfile "${GONZUI_PIDFILE}" \
--exec /usr/bin/ruby "${GONZUI_SERVER}" -- --daemon \
--gonzuirc="${GONZUIRC}" --quiet
eend $? "Failed to start gonzui"
}
stop() {
ebegin "Stopping gonzui"
start-stop-daemon --signal INT --quiet --pidfile "${GONZUI_PIDFILE}"
eend $? "Failed to stop gonzui"
}