Hi all,
I am trying to run CouchPotato as a daemon at startup on my openSuSE 12.2 box.
I have put together this script based on what works for sabnzbd and sickbeard, put it in /etc/init.d/couchpotato, chmod 755 and calling it using "/etc/init.d/couchpotato start"
Code:
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: couchpotato
# Required-Start: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Starts Couch Potato at system startup
### END INIT INFO
#
. /etc/rc.status
rc_reset
case "$1" in
start)
echo "Starting Couch Potato."
/usr/bin/sudo -u user -H "/home/user/CouchPotato-ff2b275/CouchPotato.py"
rc_status -v
;;
stop)
echo "Shutting down Couch Potato."
/usr/bin/env wget -q --delete-after "http://localhost:5000/config/exit/"
rc_status -v
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
And this is the error I am getting when trying to launch it
Code:
downloader:~ # /etc/init.d/couchpotato start
redirecting to systemctl
Job failed. See system journal and 'systemctl status' for details.
System journal has this to say:
Code:
Sep 29 11:18:12 downloader[2433]: Failed at step EXEC spawning /etc/init.d/couchpotato: Exec format error
Sep 29 11:18:12 downloader systemd[1]: couchpotato.service: control process exited, code=exited status=203
Sep 29 11:18:12 downloader systemd[1]: Unit couchpotato.service entered failed state.
Any thoughts?
Bookmarks