Skip to content
Snippets Groups Projects
Commit 27f6df60 authored by rswindell's avatar rswindell
Browse files

Karloch-supplied Debian Linux run script.

This script should probably use the 'sbbs -d' option to force daemon mode.
This script could probably be merged with the Redhat/SUSE version.
parent 6c02f54a
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
########################################
# Synchronet BBS Debian startup script #
########################################
# by Karloch <karloch@hispamsx.org> 8 Dec 2005
# Please be sure to config your Synchronet BBS in
# "daemonized" mode if you are going to use this script.
# You can activate "daemonized" mode at /sbbs/ctrl/sbbs.ini
# You can edit these vars to meet your system configuration
PATH=/bin:/sbin:/usr/bin:/usr/bin
SBBSROOT=/sbbs
DAEMON=$SBBSROOT/exec/sbbs
OPTIONS=""
export SBBSCTRL=$SBBSROOT/ctrl
export SHELL=/bin/bash
# DO NOT edit anything below this line unless you know what you doing
test -x $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting Synchronet BBS services... "
if start-stop-daemon --quiet --stop --signal 0 --exec $DAEMON
then
echo "[already running]"
else
start-stop-daemon --quiet --start --exec $DAEMON
fi
;;
stop)
echo -n "Stopping Synchronet BBS services... "
if start-stop-daemon --quiet --stop --signal 0 --exec $DAEMON
then
start-stop-daemon --quiet --stop --exec $DAEMON
sleep 2
echo "[OK]"
else
echo "[not running]"
fi
;;
restart|force-reload)
$0 stop
sleep 40
$0 start
;;
status)
echo -n "Synchronet BBS services status: "
if start-stop-daemon --quiet --stop --signal 0 --exec $DAEMON
then
echo "[running]"
echo -n "PID(s): "
pidof sbbs
else
echo "[not running]"
fi
;;
recycle)
echo -n "Putting recycle server mark on Synchronet: "
if start-stop-daemon --quiet --stop --signal 0 --exec $DAEMON
then
touch $SBBSCTRL/recycle
echo "[OK]"
else
echo "[FAILED]"
echo -n "Synchronet server doesn't seem to be running"
fi
;;
*)
echo "Usage: /etc/init.d/sbbs {start|stop|restart|force-reload|status|recycle}"
exit 1
esac
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment