Installscript-shutdown-cmds
Aus VDR Wiki
(Unterschied zwischen Versionen)
(→Beschreibung) |
|||
| Zeile 2: | Zeile 2: | ||
In '''../shutdown-cmds''' befinden sich Scripte, welche den Shutdown Prozess verzögern. | In '''../shutdown-cmds''' befinden sich Scripte, welche den Shutdown Prozess verzögern. | ||
| − | Format: | + | Format (Datei): |
'''<NAME>'''.run | '''<NAME>'''.run | ||
| − | + | Format (Head): | |
| + | |||
| + | START="1" # 0 = inactiv / 1 = activ | ||
| + | ENTRY=$"vdrrip running" # eintrag für das admin plugin <description> | ||
| + | WAITING="15" # wartezeit (shutdown -> 15min -> shutdown) | ||
Das ganze kann im [[admin-plugin]] aktiviert bzw deaktiviert werden. ('''0 = inactiv, 1 = activ) | Das ganze kann im [[admin-plugin]] aktiviert bzw deaktiviert werden. ('''0 = inactiv, 1 = activ) | ||
| Zeile 26: | Zeile 30: | ||
==Bsp (1)== | ==Bsp (1)== | ||
| + | Im Beispiel wird der Shutdown um 15min verzögert, falls das [[vdrrip-plugin]] noch am ''wandeln'' ist. | ||
| + | |||
{{Box Datei| ../shutdown-cmds/queuehandler.run | | {{Box Datei| ../shutdown-cmds/queuehandler.run | | ||
<pre> | <pre> | ||
Version vom 28. Oktober 2005, 21:11 Uhr
Beschreibung
In ../shutdown-cmds befinden sich Scripte, welche den Shutdown Prozess verzögern.
Format (Datei):
<NAME>.run
Format (Head):
START="1" # 0 = inactiv / 1 = activ ENTRY=$"vdrrip running" # eintrag für das admin plugin <description> WAITING="15" # wartezeit (shutdown -> 15min -> shutdown)
Das ganze kann im admin-plugin aktiviert bzw deaktiviert werden. (0 = inactiv, 1 = activ)
Alles weitere sollte im syslog ersichtlich sein. (vorrausgesetzt $VDR_LOG -gt 0)
'START'='0' -> '../shutdown-cmds/nfs.run' 'START'='1' -> '../shutdown-cmds/procs.run' 'START'='1' -> '../shutdown-cmds/queuehandler.run' 'START'='0' -> '../shutdown-cmds/samba.run' 'START'='0' -> '../shutdown-cmds/ssh.run' 'START'='0' -> '../shutdown-cmds/streamdev.run' 'START'='0' -> '../shutdown-cmds/users.run' ... shutdown.sh -- stop shutdown, because vdrrip running... shutdown.sh -- waiting period 15 minutes up to the next shutdown...
Bsp (1)
Im Beispiel wird der Shutdown um 15min verzögert, falls das vdrrip-plugin noch am wandeln ist.
#!/bin/sh
#
# shutdown 'wait' script (../../scripts/shutdown.sh -> $0)
START="1" # 0 = inactiv / 1 = activ
ENTRY=$"vdrrip running" # eintrag für das admin plugin
WAITING="15" # wartezeit (shutdown -> 15min -> shutdown)
if [ -s "$VDR_CONFIG/plugins/queue.vdrrip" ] ; then
MESSAGE="vdrrip running" # message im syslog + svdrp
EXITCODE=1
fi
Bsp (2)
Hier wird der Shutdown um 15min verschoben, falls $CHECKPROCS activ sind...
#!/bin/sh
#
# shutdown 'wait' script (../../scripts/shutdown.sh -> $0)
START="1"
ENTRY=$"proc(s) running"
WAITING="15"
CHECKPROCS="tvm2vdr.pl infosatepg cutinplace transcode vcdimager mencoder tosvcd lame noad wget rtorrent"
for i in $CHECKPROCS ; do
if [ -n "$(pidof $i)" -o -n "$(pidof -x $i)" ] ; then
MESSAGE="$i running"
EXITCODE=1
fi
done