After moving to new baselayout2 in gentoo I always have
rtorrentd [ crashed ]
even though it runs in screen with no issues.
Here are the conf.d:
# Owner of screen session and rtorrent process
USER="zerkms"
# Home dir with .rtorrent.rc
HOME_DIR="/home/zerkms"
# Screen options for starting rtorrent
SCREEN_OPTS="-dmS rtorrent /usr/bin/rtorrent"
# Path to *.pid file
PIDFILE="/var/run/screen.pid"
# Path to 'screen' binary
SCREEN_BIN="/usr/bin/screen"
# Path to 'rtorrent' binary
RTORRENT_BIN="/usr/bin/rtorrent"
and init.d accordingly:
depend() {
need net
}
start() {
ebegin "Starting screen & rtorrent"
env HOME=${HOME_DIR} start-stop-daemon --start --background --make-pidfile --pidfile ${PIDFILE} \
--chuid ${USER} --exec ${SCREEN_BIN} -- ${SCREEN_OPTS}
eend $?
}
stop() {
ebegin "Stopping screen & rtorrent"
start-stop-daemon --stop --quiet --exec ${RTORRENT_BIN}
eend $?
}
restart() {
ebegin "Restarting screen & rtorrent"
svc_stop
sleep 2
svc_start
eend $?
}
Tried to compare with any valid init.d script but haven't found any significant differences. Any ideas why that [crached]
label appears?