fi
ebegin "Starting aMule Daemon"
- env HOME="${AMULEHOME}" start-stop-daemon --start \
+ start-stop-daemon --start \
--quiet --background \
--make-pidfile --pidfile /var/run/amuled.pid \
- -c ${AMULEUSER} \
- -x /usr/bin/amuled >${LOG}
-
+ --env HOME="${AMULEHOME}" \
+ --user ${AMULEUSER} \
+ --exec /usr/bin/amuled >${LOG}
+
sleep 2
if ! pgrep -u ${AMULEUSER} amuled > /dev/null; then
eerror "aMule daemon can't be started! Check logfile: ${LOG}"
stop() {
ebegin "Stopping aMule daemon -- please wait"
- start-stop-daemon --oknodo --stop --pidfile /var/run/amuled.pid &>/dev/null
+ start-stop-daemon --stop --pidfile /var/run/amuled.pid 2>&1 >/dev/null
eend $?
}
OPTIONS="-h ${AMULEHOST} -p ${AMULEPORT} -P ${AMULEPWD} -A ${WEBPWD} -t ${TEMPLATE} -q"
ebegin "Starting aMule WebServer"
- env HOME="${AMULEHOME}" start-stop-daemon --start \
- --quiet -b \
+ start-stop-daemon --start \
+ --quiet --background \
--make-pidfile --pidfile /var/run/amuleweb.pid \
- -c ${AMULEUSER} \
- -x /usr/bin/amuleweb -- ${OPTIONS} &>${LOG}
-
+ --env HOME="${AMULEHOME}" \
+ --user ${AMULEUSER} \
+ --exec /usr/bin/amuleweb -- ${OPTIONS} 2>&1 >${LOG}
+
sleep 1
if ! pgrep -u ${AMULEUSER} amuleweb > /dev/null; then
eerror "aMule daemon can't be started! Check logfile: ${LOG}"
stop() {
ebegin "Stopping aMule WebServer"
- start-stop-daemon --oknodo --stop --pidfile /var/run/amuleweb.pid &>/dev/null
+ start-stop-daemon --stop --pidfile /var/run/amuleweb.pid 2>&1 >/dev/null
eend $?
}