by darkside401 » Sat Feb 02, 2013 10:19 am
$this->bbcode_second_pass_quote('m0rphU', 'D')id the latest updates and experienced the initscript has moved to a systemd script... Now I'm missing any chance to start sabnzbd on my Pogo (POGO-B02, oxnas-based)
Is there any chance to get this working on oxnas devices? Seems systemd isn't working there.
Same problem here.
Updated from 0.7.6 to 0.7.10 and the rc.d Script is missing.
Any chance to get the fixed?
Edit:
As an intermediate help, i just had the old Sabnzbd package in my Cache and i just extracted the rc.d Script.
You just have to put it in the the /etc/rc.d folder and make it executeable.
$this->bbcode_second_pass_code('', '#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/sabnzbd
PID="$(pgrep -f -u "${SABNZBD_USER}" SABnzbd.py)"
case "${1}" in
start)
stat_busy "Starting SABnzbd"
if [ -f /run/daemons/sabnzbd ]; then
echo -n "Sabnzbd is already running as a daemon! If you are certain it is not running, remove /run/daemons/sabnzbd."
stat_fail
else
su - "${SABNZBD_USER}" -c "python2 ${SABNZBD_DIR}/SABnzbd.py ${SABNZBD_ARGS}" -s /bin/sh
if [ "${?}" -gt 0 ]; then
stat_fail
exit 1
else
add_daemon sabnzbd
stat_done
fi
fi
;;
stop)
stat_busy "Stopping SABnzbd"
curl -f "${SABNZBD_PROTOCOL}://${SABNZBD_USPW}${SABNZBD_IP}:${SABNZBD_PORT}/sabnzbd/api?mode=shutdown&apikey=${SABNZBD_KEY}" &> /dev/null
if [ "${?}" -gt 0 ]; then
stat_fail
exit 1
else
rm_daemon sabnzbd
stat_done
fi
;;
force-stop)
stat_busy "Stopping SABnzbd (forced)"
[ -n "${PID}" ]; kill "${PID}" &> /dev/null
if [ "${?}" -gt 0 ]; then
stat_fail
exit 1
else
[ -f /run/daemons/sabnzbd ]; rm -f /run/daemons/sabnzbd &> /dev/null
rm_daemon sabnzbd
stat_done
fi
;;
restart)
"${0}" stop
sleep 1
"${0}" start
;;
force-restart)
"${0}" force-stop
sleep 1
"${0}" start
;;
status)
stat_busy "Checking SABnzbd status";
ck_status sabnzbd
;;
*)
echo "usage: ${0} {start|stop|restart|force-stop|force-restart|status}"
esac
exit 0
')