diff --git a/install/init.d/sbbs.gentoo b/install/init.d/sbbs.gentoo new file mode 100644 index 0000000000000000000000000000000000000000..99845b5f7a3051ffa5f455fb4808a179457509da --- /dev/null +++ b/install/init.d/sbbs.gentoo @@ -0,0 +1,45 @@ +#!/sbin/runscript + +# Gentoo Linux system service run script (init file) for Synchronet +# +# This file normally goes in your /etc/init.d directory +# +# $Id$ + +######################################## +# Synchronet BBS Gentoo startup script # +######################################## +# by access_d <axisd> Aug-31-2011 + +# You can edit these vars to meet your system configuration + +SBBSDIR=/sbbs +export SBBSCTRL=$SBBSDIR/ctrl + +PROG="$SBBSDIR/exec/sbbs" +PIDFILE="/var/run/sbbs.pid" + +opts="${opts} restart" + +depend() { + need localmount + after bootmisc +} + +start() { + ebegin "Starting SBBS services" + start-stop-daemon --start --exec $PROG d --pidfile $PIDFILE + eend $? +} + +stop() { + ebegin "Stopping SBBS services" + start-stop-daemon --stop --exec $PROG --pidfile $PIDFILE + eend $? +} + +restart() { + stop + sleep 3 + start +}