From Python to shell script

- Allowing to run mpd + icecast2 + fip relay with metadatas on a VM
  with 128Mo of memory.
- Calculating when to update (given the end field in the JSON)
This commit is contained in:
Yann Weber 2019-01-08 02:26:50 +01:00
commit bcafd50a3d
5 changed files with 52 additions and 213 deletions

View file

@ -9,14 +9,11 @@
# Description: Start updating Icecast2 metadatas using FIP radio wep API
### END INIT INFO
DPATH=/PUT/SCRIPT/PATH/HERE
DPATH="PATH TO SCRIPT"
SCRIPT="fip_current.py"
DAEMON="${DPATH}/${SCRIPT}"
CONFIG="${DPATH}/conf.ini"
DAEMON="${DPATH}/fip_current.sh"
NAME="fip-current"
DESC="fip-current update script"
DAEMON_OPTS="-ul -c $CONFIG"
PIDFILE="/run/fip-current.pid"
set_path()
@ -38,14 +35,14 @@ case $1 in
echo -n " allready running"
log_end_msg 1
else
start-stop-daemon --quiet --start --background -m -p $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
start-stop-daemon --quiet --start --background -m -p $PIDFILE --exec $DAEMON
log_end_msg $?
fi
;;
stop)
log_daemon_msg "Stopping $DESC"
start-stop-daemon --stop -p $PIDFILE --remove-pidfile -x $DAEMON
start-stop-daemon --stop -p $PIDFILE --remove-pidfile
log_end_msg $?
;;
restart)