aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/firebird/files/bbs.sh.example
diff options
context:
space:
mode:
Diffstat (limited to 'chinese/firebird/files/bbs.sh.example')
-rw-r--r--chinese/firebird/files/bbs.sh.example37
1 files changed, 37 insertions, 0 deletions
diff --git a/chinese/firebird/files/bbs.sh.example b/chinese/firebird/files/bbs.sh.example
new file mode 100644
index 000000000000..084ec41aa027
--- /dev/null
+++ b/chinese/firebird/files/bbs.sh.example
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# bbs.sh
+#
+# $Id$
+
+bbsd_port=23
+
+case "$1" in
+ start)
+ if [ -x /usr/local/bbs/bin/bbsd ]; then
+ /usr/local/bbs/bin/bbsd $bbsd_port && echo -n ' bbsd'
+ fi
+ if [ -x /usr/local/bbs/innd/innbbsd ]; then
+ su bbs -c '/usr/local/bbs/innd/innbbsd' && echo -n ' bbs.innbbsd'
+ fi
+ if [ -f /usr/local/bbs/etc/cron.bbs ]; then
+ su bbs -c 'crontab /usr/local/bbs/etc/cron.bbs' && echo -n ' bbs.cron'
+ fi
+ ;;
+ stop)
+ if [ -f /usr/local/bbs/log/bbsd.pid ]; then
+ /bin/kill `cat /usr/local/bbs/log/bbsd.pid`
+ /usr/bin/killall bbsd 2> /dev/null
+ rm -fr /usr/local/bbs/log/bbsd.pid
+ echo -n " -bbsd"
+ else
+ echo "bbsd does not start yet. (pid file not found.)"
+ fi
+ ;;
+ *)
+ echo ""
+ echo "usage: `basename $0` { start | stop }"
+ echo ""
+ exit 64
+ ;;
+esac \ No newline at end of file