在 /etc/init.d/ 建立一個 xspd 的文字檔,內容如下:

#!/bin/sh
case "$1" in
start)
    echo "Starting xsp..."
    nohup xsp --port 80 --root /var/www/html/ --nonstop &
    ;;
stop)
    echo "Stopping xsp..."
    ;;
restart)
    echo "Restarting xsp..."
    ;;
*)
    echo "Usage: 'basename $0' {start|stop|restart}" >&2
    exit 64
    ;;
esac
exit 0

然後 chmod 為可執行即可,自動啟動可在 /etc/rc.local 中設定 service xspd start
… 這段是在網路上 Google 到的,雖然功能還不全,但還能湊合著用吧~~ :p

最後修改日期: 2008-12-25

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。