suse-start-stop
上传用户:seven77cht
上传日期:2007-01-04
资源大小:486k
文件大小:1k
- #!/bin/sh
- # wwwoffle daemon start/stop script.
- #
- # Copyright Andrew M. Bishop 1997 (was slackware-rc.local)
- # Modified A. Kupries 1998, for usage by the S.u.S.e init system.
- #
- # Usually this is put in /etc/init.d (at least on machines SYSV R4
- # based systems) and linked to /etc/rc[23].d/S18wwwoffle. When this is
- # done the wwwoffle server will be started when the machine is started.
- PATH=/sbin:/usr/bin:/usr/sbin:/bin
- basedir=/usr/local
- bindir=/usr/local/bin
- sbindir=/usr/local/sbin
- export PATH
- mode=$1
- # Safeguard (relative paths, core dumps..)
- cd $basedir
- case "$mode" in
- 'start')
- # Start deamon
- if [ -x $sbindir/wwwoffled ]; then
- echo "Starting wwwoffled."
- $sbin/wwwoffled -c /var/spool/wwwoffle/wwwoffle.conf
- fi
- ;;
- 'stop')
- # Stop deamon
- echo "Shutting down wwwoffled."
- $bindir/wwwoffle -kill -c /var/spool/wwwoffle/wwwoffle.conf
- ;;
- *)
- # usage
- echo "usage: $0 start|stop"
- exit 1
- ;;
- esac