Lines 46-57
start() {
Link Here
|
46 |
|
46 |
|
47 |
|
47 |
|
48 |
if [[ "${DELUGEUI_START}" == "true" ]] ; then |
48 |
if [[ "${DELUGEUI_START}" == "true" ]] ; then |
49 |
ebegin "Starting Deluge" |
49 |
DELUGEUI_BINARY="$(which deluge-${DELUGEUI_TYPE})" |
50 |
start-stop-daemon --start --background --pidfile \ |
50 |
if [[ -x ${DELUGEUI_BINARY} ]] ; then |
51 |
/var/run/deluge.pid --make-pidfile \ |
51 |
ebegin "Starting Deluge UI" |
52 |
--exec /usr/bin/deluge -c "${DELUGED_USER}" \ |
52 |
start-stop-daemon --start --background --pidfile \ |
53 |
-e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS} |
53 |
/var/run/deluge.pid --make-pidfile \ |
54 |
eend $? |
54 |
--exec ${DELUGEUI_BINARY} -c "${DELUGED_USER}" \ |
|
|
55 |
-e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS} |
56 |
eend $? |
57 |
fi |
55 |
fi |
58 |
fi |
56 |
} |
59 |
} |
57 |
|
60 |
|
Lines 63-71
stop() {
Link Here
|
63 |
|
66 |
|
64 |
|
67 |
|
65 |
if [[ "${DELUGEUI_START}" == "true" ]] ; then |
68 |
if [[ "${DELUGEUI_START}" == "true" ]] ; then |
66 |
ebegin "Stopping Deluge" |
69 |
DELUGEUI_BINARY="$(which deluge-${DELUGEUI_TYPE})" |
67 |
start-stop-daemon --stop --user "${DELUGED_USER}" \ |
70 |
if [[ -x ${DELUGEUI_BINARY} ]] ; then |
68 |
--name deluge --pidfile /var/run/deluge.pid |
71 |
ebegin "Stopping Deluge UI" |
69 |
eend $? |
72 |
start-stop-daemon --stop --user "${DELUGED_USER}" \ |
|
|
73 |
--name ${DELUGEUI_BINARY} --pidfile /var/run/deluge.pid |
74 |
eend $? |
75 |
fi |
70 |
fi |
76 |
fi |
71 |
} |
77 |
} |
72 |
- |
|
|