summaryrefslogtreecommitdiffstats
path: root/scripts/utils-sync.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/utils-sync.sh')
-rw-r--r--scripts/utils-sync.sh40
1 files changed, 14 insertions, 26 deletions
diff --git a/scripts/utils-sync.sh b/scripts/utils-sync.sh
index d58f14a..9b731a2 100644
--- a/scripts/utils-sync.sh
+++ b/scripts/utils-sync.sh
@@ -4,7 +4,7 @@
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -23,20 +23,20 @@ get_conf() {
get_ip() {
if [ "$HDSYNC_NETWORK" = "DYNAMIC" ]; then
- echo "`date +%T` listening for DHCP assigned IP on the network"
- config_tool -c LAN_TYPE='d'
- IP=`get_conf IP2`
+ echo "`date +%T` listening for DHCP assigned IP on the network"
+ config_tool -c LAN_TYPE='d'
+ IP=`get_conf IP2`
elif [ "$HDSYNC_NETWORK" = "STATIC" ]; then
- echo "`date +%T` setting a static network address"
- IP="192.168.0.$HDSYNC_CHANNEL"
- config_tool -c LAN_TYPE='s'
- config_tool -c IP2=$IP
- config_tool -c NETMASK2=255.255.255.0
- ifconfig eth0 $IP netmask 255.255.255.0
- echo "`date +%T` network interface configured with address $IP ..."
+ echo "`date +%T` setting a static network address"
+ IP="192.168.0.$HDSYNC_CHANNEL"
+ config_tool -c LAN_TYPE='s'
+ config_tool -c IP2=$IP
+ config_tool -c NETMASK2=255.255.255.0
+ ifconfig eth0 $IP netmask 255.255.255.0
+ echo "`date +%T` network interface configured with address $IP ..."
else
- IP=`get_conf IP2`
- echo "`date +%T` network interface manualy configured with address $IP ..."
+ IP=`get_conf IP2`
+ echo "`date +%T` network interface manualy configured with address $IP ..."
fi
export IP
}
@@ -67,17 +67,5 @@ get_bins() {
prepare_play() {
file=`ls $USBROOT/video`
- $AV -p $UPNPPORT load "$USBROOT/video/$file"
-
- sync
-
- $AV -p $UPNPPORT play
-
- sync
- sleep 1
-
- $AV -p $UPNPPORT stop
-
- # $AV -p $UPNPPORT pause
- # sync
+ $SYNC -s localhost -p $UPNPPORT prepare "$USBROOT/video/$file"
}