We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

comparison media-tv/emby-server/files/emby-server.init_3 @ 184:734821f25078

updated init scripts for emby-server and emby-server-beta
author gsnerf <gsnerf@gsnerf.de>
date Sun, 25 Sep 2016 15:10:47 +0200
parents
children
comparison
equal deleted inserted replaced
183:c90ceb174535 184:734821f25078
1 #!/sbin/openrc-run
2
3 PIDFILE="/tmp/emby-server.pid"
4 #EXEC="mono-service2 -d /opt/emby-server/ -m emby-server -n emby-server /opt/emby-server/MediaBrowser.Server.Mono.exe -programdata ${PROGRAMDATA}"
5 #EXEC="/opt/emby-server/start.sh"
6 EXEC="./MediaBrowser.Server.Mono.exe -programdata ${PROGRAMDATA} -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe"
7 EXEC_DIR="/opt/emby-server/"
8 LOG_FILE="/var/log/emby-server_start.log"
9
10 start() {
11 ebegin "Starting Emby-Server"
12 # we are starting the service (-x):
13 # - in background with the given pid file (-m -p -b)
14 # - as a specific user (-u)
15 #start-stop-daemon -S -m -p $PIDFILE -b -u ${EXEC_USER} -d ${EXEC_DIR} -x ${EXEC} -1 ${LOG_FILE} -2 ${LOG_FILE}
16 start-stop-daemon -S -m -p $PIDFILE -b -u ${EXEC_USER} -d ${EXEC_DIR} -1 ${LOG_FILE} -2 ${LOG_FILE} -x mono -- ${EXEC}
17 eend $?
18 }
19
20 stop() {
21 ebegin "Stopping Emby-Server"
22 start-stop-daemon -K -p ${PIDFILE}
23 eend $?
24 }
25
26 restart() {
27 stop
28 sleep 3
29 start
30 }