7 [[ -f /var
/run
/deluge-web.pid
]] && PID
=$
(cat /var
/run
/deluge-web.pid
)
8 [[ -d /proc
/$PID ]] || PID
=
12 stat_busy
"Starting Deluge WebUI"
13 [[ -z $PID ]] && su
-l -s /bin
/sh
-c "/usr/bin/deluge-web -f >/dev/null" $DELUGE_USER
18 echo $
(pgrep
-u $DELUGE_USER deluge-web
) > /var
/run
/deluge-web.pid
24 stat_busy
"Stopping Deluge WebUI"
25 [[ ! -z $PID ]] && kill $PID &> /dev
/null
29 rm /var
/run
/deluge-web.pid
40 echo "usage: $0 {start|stop|restart}"