Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # Startup script for deluged
- #
- # chkconfig: - 86 14
- # description: deluge daemon
- # processname: deluged
- # pidfile: /var/run/deluged.pid
- # config:
- # Source function library.
- . /etc/init.d/functions
- # Get network config
- . /etc/sysconfig/network
- [ "${NETWORKING}" = "no" ] && exit 0
- prog=deluged
- params="-q"
- lockfile=/var/lock/subsys/deluged
- start() {
- echo -n $"Starting deluged: "
- daemon --user deseven "$prog $params"
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $lockfile
- return $RETVAL
- }
- stop() {
- echo -n $"Stopping deluged: "
- killproc $prog
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $lockfile
- return $RETVAL
- }
- case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status $prog
- ;;
- restart)
- stop
- start
- ;;
- *)
- echo $"Usage: $prog {start|stop|status|restart}"
- exit 1
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement