Clipinc.sh

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 2: Zeile 2:
 
#!/bin/sh
 
#!/bin/sh
 
#
 
#
# sample script for clipinc
+
# clipinc.sh - v.0.1
 
#
 
#
# need: atd
+
# add this lines to your reccmds.conf:
 +
# folgende zeilen in die reccmds.conf eintragen:
 +
#
 +
# Start clipinc : /usr/local/bin/clipinc.sh -start
 +
# Stop clipinc? : /usr/local/bin/clipinc.sh -kill
  
 
case "${1}" in
 
case "${1}" in
     start)
+
     -start)
        test -s "${2}/recinfo.conf" || {
+
msg() {
            echo "--------------------------"
+
    echo -e "-----------\n${@}\n-----------"
            echo  "recinfo.conf not found..."
+
}
            echo "--------------------------"
+
 
            exit 1
+
test -s "${2}/recinfo.conf" || {
        }
+
    msg "recinfo.conf not found..."
        test -d /etc/vdr/scripts/clipinc || {
+
    exit 1
            echo "--------------------------"
+
}
            echo "/etc/vdr/scripts/clipinc not found..."
+
 
            echo "--------------------------"
+
test -d "$SOURCEDIR/clipinc" || {
            exit 1
+
    msg "$SOURCEDIR/clipinc not found..."
        }
+
    exit 1
        at now <<EOF
+
}
        cd /etc/vdr/scripts/clipinc
+
 
        ./clipinc.pl "${2}"
+
at now <<EOF
 +
cd "$SOURCEDIR/clipinc"
 +
./clipinc.pl "${2}"
 
EOF
 
EOF
        ;;
+
;;
 +
    -kill)
 +
killall clipinc.pl
 +
;;
 
esac
 
esac
 
</pre>
 
</pre>
  
 
[[Kategorie:Scripts]]
 
[[Kategorie:Scripts]]

Version vom 22. November 2004, 14:47 Uhr

#!/bin/sh
#
# clipinc.sh - v.0.1
#
# add this lines to your reccmds.conf:
# folgende zeilen in die reccmds.conf eintragen:
#
# Start clipinc : /usr/local/bin/clipinc.sh -start
# Stop clipinc? : /usr/local/bin/clipinc.sh -kill

case "${1}" in
    -start)
	msg() {
	    echo -e "-----------\n${@}\n-----------"
	}

	test -s "${2}/recinfo.conf" || {
	    msg "recinfo.conf not found..."
	    exit 1
	}

	test -d "$SOURCEDIR/clipinc" || {
	    msg "$SOURCEDIR/clipinc not found..."
	    exit 1
	}

at now <<EOF
cd "$SOURCEDIR/clipinc"
./clipinc.pl "${2}"
EOF
	;;
    -kill)
	killall clipinc.pl
	;;
esac