summaryrefslogtreecommitdiffstats
path: root/sample/pttbbs.sh
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-04 17:39:34 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-04 17:39:34 +0800
commitcd5bcb81c52c7bf0f8c29232145b81ce5b44bd01 (patch)
tree263018913615543a507fa9cf0c9d52c5cb35cb68 /sample/pttbbs.sh
parentc8a46a1e88d4cca6af4cbb4414e9d560aee7ef28 (diff)
downloadpttbbs-cd5bcb81c52c7bf0f8c29232145b81ce5b44bd01.tar
pttbbs-cd5bcb81c52c7bf0f8c29232145b81ce5b44bd01.tar.gz
pttbbs-cd5bcb81c52c7bf0f8c29232145b81ce5b44bd01.tar.bz2
pttbbs-cd5bcb81c52c7bf0f8c29232145b81ce5b44bd01.tar.lz
pttbbs-cd5bcb81c52c7bf0f8c29232145b81ce5b44bd01.tar.xz
pttbbs-cd5bcb81c52c7bf0f8c29232145b81ce5b44bd01.tar.zst
pttbbs-cd5bcb81c52c7bf0f8c29232145b81ce5b44bd01.zip
document
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@684 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'sample/pttbbs.sh')
-rwxr-xr-xsample/pttbbs.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/sample/pttbbs.sh b/sample/pttbbs.sh
new file mode 100755
index 00000000..056aacb8
--- /dev/null
+++ b/sample/pttbbs.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# 請注意! 這個檔案將以 root 的權限執行.
+# 預設使用 bbs這個帳號, 安裝目錄為 /home/bbs
+
+case "$1" in
+start)
+ # 初始化 shared-memory, 載入使用者帳號
+ /usr/bin/su -fm bbs -c /home/bbs/bin/uhash_loader
+
+ # 寄信至站外
+ /usr/bin/su -fm bbs -c /home/bbs/bin/outmail &
+
+ # 轉信
+ /usr/bin/su -fm bbs -c /home/bbs/innd/innbbsd &
+
+ # 啟動 port 23 (port 23須使用 root 才能進行 bind )
+ /home/bbs/bin/mbbsd 23 &
+
+ # 啟動 utmpsortd
+ /bin/sleep 5; /usr/bin/su -fm bbs -c /home/bbs/bin/shmctl utmpsortd &
+
+ # 提示
+ echo -n ' mbbsd'
+ ;;
+stop)
+ /usr/bin/killall outmail
+ /usr/bin/killall innbbsd
+ /usr/bin/killall mbbsd
+ /usr/bin/killall shmctl
+ /bin/sleep 2; /usr/bin/killall shmctl
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0