-
Notifications
You must be signed in to change notification settings - Fork 1
/
init
35 lines (28 loc) · 936 Bytes
/
init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket dbus-send --system --print-reply --dest=org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager.StartUnit string:"plymouth-quit.service" string:"replace"
sleep 1
echo "cp Video File"
cp media/*.mp4 video.mp4 || true
echo "cp Done"
while true; do
if test -f "$FILE"; then
echo "$FILE exists."
if [ ! -z "$MODE" ]; then
echo "Player Mode is $MODE"
if [ "$MODE" == "master" ]; then
echo "Start Master1"
./omxplayer-sync -mu $FILE >/proc/1/fd/1
else
echo "Start Slave"
./omxplayer-sync -lu $FILE >/proc/1/fd/1
fi
else
echo "No Mode - Play Pure"
omxplayer $FILE >/proc/1/fd/1
fi
else
echo "No File exists ... Sleep 30 Sek"
sleep 30
fi
done