summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tsoy <alexander@tsoy.me>2015-10-27 16:45:07 +0300
committerAlexander Tsoy <alexander@tsoy.me>2015-10-27 17:05:18 +0300
commit41f25eb21b8f14a516847ab494208539fec6ec8d (patch)
tree3f80d8d10d7453ed4bfad41043866ef881480fd8 /net-p2p/amule
parentnet-p2p/amule: enable verbose build log (diff)
downloadgentoo-41f25eb21b8f14a516847ab494208539fec6ec8d.tar.gz
gentoo-41f25eb21b8f14a516847ab494208539fec6ec8d.tar.bz2
gentoo-41f25eb21b8f14a516847ab494208539fec6ec8d.zip
net-p2p/amule: update init script
- properly pass env variable to the daemon - replace/remove deprecated start-stop-daemon options - use portable shell Gentoo-Bug: 420157
Diffstat (limited to 'net-p2p/amule')
-rw-r--r--net-p2p/amule/files/amuled.initd11
-rw-r--r--net-p2p/amule/files/amuleweb.initd13
2 files changed, 13 insertions, 11 deletions
diff --git a/net-p2p/amule/files/amuled.initd b/net-p2p/amule/files/amuled.initd
index 9b83458b380a..082e2ffe15f2 100644
--- a/net-p2p/amule/files/amuled.initd
+++ b/net-p2p/amule/files/amuled.initd
@@ -22,12 +22,13 @@ start() {
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}"
@@ -37,7 +38,7 @@ start() {
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 $?
}
diff --git a/net-p2p/amule/files/amuleweb.initd b/net-p2p/amule/files/amuleweb.initd
index 0484780093a2..05e7d9f192b8 100644
--- a/net-p2p/amule/files/amuleweb.initd
+++ b/net-p2p/amule/files/amuleweb.initd
@@ -26,12 +26,13 @@ start() {
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}"
@@ -43,7 +44,7 @@ start() {
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 $?
}