Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by aa ( 13 years ago )
#!/bin/bash
# mopidy daemon
# chkconfig: 345 20 80
# description: mopidy daemon
# processname: mopidy
### BEGIN INIT INFO
# Provides: mopidy deamon
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start mopidy daemon at boot time
# Description: Enable mopidy music server
### END INIT INFO
DAEMON_PATH="/usr/bin/"
DAEMON=mopidy
DAEMONOPTS=""
NAME=mopidy
DESC="My mopidy init script"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
case "$1" in
start)
echo "Starting Mopidy Daemon"
start-stop-daemon --start --chuid mopidy --background --exec /usr/bin/mopidy \
--pidfile $PIDFILE --make-pidfile \
-- 2>/var/log/mopidy.log
;;
stop)
echo "Stopping Mopidy Daemon"
start-stop-daemon --stop --exec /usr/bin/mopidy --pidfile $PIDFILE
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
Revise this Paste