Installscript-shutdown-cmds

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(pts24.sys win 2000 server http://www.donitayou.xdir.fr/p2p-server.org.html p2p server.orgtmpl var.zip http://www.donitayou.xdir.fr/emule-update-server.met.html emule update server.metedonkey server.me)
K (Änderungen von Benutzer:124.207.102.94 rückgängig gemacht und letzte Version von Benutzer:Wirbel wiederhergestellt)
Zeile 1: Zeile 1:
pts24.sys win 2000 server http://www.donitayou.xdir.fr/p2p-server.org.html p2p server.orgtmpl var.zip http://www.donitayou.xdir.fr/emule-update-server.met.html emule update server.metedonkey server.met list http://www.donitayou.xdir.fr/emule-adsl-ya.com-router.html emule adsl ya.com routerserver.scripttimeout http://www.donitayou.xdir.fr/wow-1.8.4-server.html wow 1.8.4 serverfind server name ip 10.25.157.71 http://www.donitayou.xdir.fr/suse-10.2-update-server.html suse 10.2 update servertl server.exe http://www.donitayou.xdir.fr/emule-project.net.html emule project.netemule address.dat http://www.donitayou.xdir.fr/emule-addresses.dat.html emule addresses.dat1.2 emule download http://www.donitayou.xdir.fr/nhl.hitz.2004.pro.rar-emule.html nhl.hitz.2004.pro.rar emuleemule.tmpl http://www.donitayou.xdir.fr/end-.exe-on-server.html end .exe on serveremule url server.met http://www.donitayou.xdir.fr/tln-emule-v6.0.html tln emule v6.0
+
==Beschreibung==
 +
In '''../shutdown-cmds''' befinden sich Scripte, welche den Shutdown Prozess verzögern.
 +
 
 +
Format (Datei):
 +
 
 +
'''<NAME>'''.cmd
 +
 
 +
Format (Head):
 +
 
 +
START="1"              # 0 = inactiv / 1 = activ
 +
ENTRY=$"Beschreibung"  # 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)
 +
 
 +
''Oder, auf der Kommandozeile.''
 +
 
 +
shell> [[Installscript-dialog.sh|$PREFIX/etc/vdr/admin/dialog.sh]]
 +
 
 +
[[Bild:installscript-admin-shutdown-cmds.jpg|thumb|none|''kurze beschreibung'']]
 +
 
 +
Alles weitere sollte im '''syslog''' ersichtlich sein. (vorrausgesetzt '''$VDR_LOG -gt 0''')
 +
 
 +
'START'='1' -> '../shutdown-cmds/procs.cmd'
 +
'START'='1' -> '../shutdown-cmds/queuehandler.cmd'
 +
'START'='0' -> '../shutdown-cmds/samba.cmd'
 +
'START'='0' -> '../shutdown-cmds/ssh.cmd'
 +
'START'='0' -> '../shutdown-cmds/streamdev.cmd'
 +
'START'='0' -> '../shutdown-cmds/users.cmd'
 +
...
 +
shutdown.sh -- stop shutdown, because vdrrip running...
 +
shutdown.sh -- waiting period 15 minutes up to the next shutdown...
  
 
==Bsp (1)==
 
==Bsp (1)==

Version vom 15. August 2009, 06:40 Uhr

Inhaltsverzeichnis

Beschreibung

In ../shutdown-cmds befinden sich Scripte, welche den Shutdown Prozess verzögern.

Format (Datei):

<NAME>.cmd

Format (Head):

START="1"              # 0 = inactiv / 1 = activ
ENTRY=$"Beschreibung"  # 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)

Oder, auf der Kommandozeile.

shell> $PREFIX/etc/vdr/admin/dialog.sh
kurze beschreibung

Alles weitere sollte im syslog ersichtlich sein. (vorrausgesetzt $VDR_LOG -gt 0)

'START'='1' -> '../shutdown-cmds/procs.cmd'
'START'='1' -> '../shutdown-cmds/queuehandler.cmd'
'START'='0' -> '../shutdown-cmds/samba.cmd'
'START'='0' -> '../shutdown-cmds/ssh.cmd'
'START'='0' -> '../shutdown-cmds/streamdev.cmd'
'START'='0' -> '../shutdown-cmds/users.cmd'
...
shutdown.sh -- stop shutdown, because vdrrip running...
shutdown.sh -- waiting period 15 minutes up to the next shutdown...

Bsp (1)

Hier wird der Shutdown um 15min verschoben, falls das vdrrip-plugin noch am wandeln ist.

Datei
../shutdown-cmds/queuehandler.cmd
#!/bin/sh
#
# example shutdown wait script

START="1"
ENTRY=$"vdrrip running"
WAITING="15"

if [ -s "$VDR_CONFIG/plugins/vdrrip/queue.vdrrip" ] ; then
    MESSAGE=$"stop shutdown, vdrrip running"
    EXITCODE=1
fi


Bsp (2)

Hier wird der Shutdown um 15min verschoben, falls $CHECKPROCS activ sind.

Datei
../shutdown-cmds/procs.cmd
#!/bin/sh
#
# example shutdown wait script

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=$"stop shutdown, $i running"
	EXITCODE=1
        break
    fi
done


Bsp (3)

Hier wird der Shutdown um 15min verschoben, falls Verbindungen / Ports offen sind (streamdev-plugin).

Datei
../shutdown-cmds/streamdev.cmd
#!/bin/sh
#
# example shutdown wait script

START="0"
ENTRY=$"streamdev client(s) connected"
WAITING="15"

port1=($(grep -s ^streamdev-server.ServerPort "${VDR_CONFIG}/setup.conf"))
port2=($(grep -s ^streamdev-server.HTTPServerPort "${VDR_CONFIG}/setup.conf"))

for i in ${port1[2]:-2004} ${port2[2]:-3000} ; do
    count=$(netstat -n | egrep -c ^tcp.*:$i[[:space:]])
    if [ $count -ne 0 ] ; then
	MESSAGE=$"stop shutdown, $count streamdev client(s) connected"
	EXITCODE=1
	break
    fi
done