- (re)add missing netzkino_wget.sh
authorsvenhoefer <svenhoefer@svenhoefer.com>
Tue, 15 Jul 2014 12:42:35 +0000 (14:42 +0200)
committerEzak <kazems@gmx.de>
Sat, 25 Oct 2014 15:41:13 +0000 (17:41 +0200)
var/plugins/netzkino_wget.sh [new file with mode: 0644]

diff --git a/var/plugins/netzkino_wget.sh b/var/plugins/netzkino_wget.sh
new file mode 100644 (file)
index 0000000..ecb90dd
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+wget_busy_file="/tmp/.netzkino_wget.busy"
+movie_file="$2"
+stream_name="$1"
+
+netzkino_wget() {
+       touch $wget_busy_file
+       wget -c -O "${movie_file}" "http://pmd.netzkino-and.netzkino.de/${stream_name}.mp4"
+       rm $wget_busy_file
+}
+
+if [ ! -e $wget_busy_file ]; then
+       netzkino_wget &
+fi