|
@@ -20,6 +20,8 @@
|
|
|
|
|
|
|
|
echo "# Popufare DIU package installer script"
|
|
echo "# Popufare DIU package installer script"
|
|
|
|
|
|
|
|
|
|
+tarball="package.tgz"
|
|
|
|
|
+
|
|
|
BINDIR="/home/bus/bin"
|
|
BINDIR="/home/bus/bin"
|
|
|
CONFIGDIR="/home/bus/config"
|
|
CONFIGDIR="/home/bus/config"
|
|
|
BINLIST="avls billdb client_supervisor debug_client diu_minder gps_minder ipc_server paddlemgr passdb piu_minder send_billing_record send_magstrip"
|
|
BINLIST="avls billdb client_supervisor debug_client diu_minder gps_minder ipc_server paddlemgr passdb piu_minder send_billing_record send_magstrip"
|
|
@@ -30,46 +32,56 @@ if [[ ! -e /home/bus/config/popufare.witness ]] ; then
|
|
|
exit 0
|
|
exit 0
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
-if [[ ! -e ./popufare.witness ]] ; then
|
|
|
|
|
- echo "# Could not find local 'popufare.witness'. Are you sure you're installing this from a package?"
|
|
|
|
|
- echo ""
|
|
|
|
|
- exit 1
|
|
|
|
|
-fi
|
|
|
|
|
|
|
+killall client_supervisor ; sleep 5 ;
|
|
|
|
|
|
|
|
-./build_all.sh native
|
|
|
|
|
|
|
+tmpdir=`mktemp -d`
|
|
|
|
|
+tar -C $tmpdir -zxf $tarball
|
|
|
|
|
+pushd $tmpdir > /dev/null
|
|
|
|
|
|
|
|
-killall client_supervisor ; sleep 5 ;
|
|
|
|
|
|
|
+ if [[ ! -e ./popufare.witness ]] ; then
|
|
|
|
|
+ echo "# Could not find local 'popufare.witness'. Are you sure you're installing this from a package?"
|
|
|
|
|
+ echo ""
|
|
|
|
|
|
|
|
-# These represent the most common files that are going to need to be
|
|
|
|
|
-# updated.
|
|
|
|
|
-# Other system files, like rc.local, the PPP config files, etc.
|
|
|
|
|
-# can also be updated as needed, but for now the focus is on
|
|
|
|
|
-# the binaries and scripts located in /home/bus/.
|
|
|
|
|
-#
|
|
|
|
|
-for binfn in $BINDLIST ; do
|
|
|
|
|
- rm -f $BINDIR/$binfn
|
|
|
|
|
- cp -L bin/native/$binfn $BINDIR/$binfn
|
|
|
|
|
-done
|
|
|
|
|
|
|
+ popd > /dev/null
|
|
|
|
|
|
|
|
-for scriptfn in $SCRIPTLIST ; do
|
|
|
|
|
- rm -f $BINDIR/$scriptfn
|
|
|
|
|
- cp -L scripts/$scriptfn $BINDIR/$scriptfn
|
|
|
|
|
-done
|
|
|
|
|
|
|
+ rm -rf $tmpdir
|
|
|
|
|
+ exit 1
|
|
|
|
|
+ fi
|
|
|
|
|
|
|
|
-rm -rf $CONFIGDIR/html
|
|
|
|
|
-cp -L -R DIUv2/html $CONFIGDIR/
|
|
|
|
|
|
|
+ ./build_all.sh native
|
|
|
|
|
|
|
|
-# Misc. scripts/programs missed by the above
|
|
|
|
|
-#
|
|
|
|
|
-rm -f $BINDIR/diu_kiosk
|
|
|
|
|
-cp -L DIUv2/diu_kiosk $BINDIR/
|
|
|
|
|
|
|
+ # These represent the most common files that are going to need to be
|
|
|
|
|
+ # updated.
|
|
|
|
|
+ # Other system files, like rc.local, the PPP config files, etc.
|
|
|
|
|
+ # can also be updated as needed, but for now the focus is on
|
|
|
|
|
+ # the binaries and scripts located in /home/bus/.
|
|
|
|
|
+ #
|
|
|
|
|
+ for binfn in $BINDLIST ; do
|
|
|
|
|
+ rm -f $BINDIR/$binfn
|
|
|
|
|
+ cp -L bin/native/$binfn $BINDIR/$binfn
|
|
|
|
|
+ done
|
|
|
|
|
|
|
|
-rm -f $BINDIR/reset-gps
|
|
|
|
|
-cp -L scripts/reset-gps.py $BINDIR/reset-gps
|
|
|
|
|
|
|
+ for scriptfn in $SCRIPTLIST ; do
|
|
|
|
|
+ rm -f $BINDIR/$scriptfn
|
|
|
|
|
+ cp -L scripts/$scriptfn $BINDIR/$scriptfn
|
|
|
|
|
+ done
|
|
|
|
|
|
|
|
-# Indicate we have a Popufare installation
|
|
|
|
|
-#
|
|
|
|
|
-touch $CONFIGDIR/popufare.witness
|
|
|
|
|
|
|
+ rm -rf $CONFIGDIR/html
|
|
|
|
|
+ cp -L -R DIUv2/html $CONFIGDIR/
|
|
|
|
|
+
|
|
|
|
|
+ # Misc. scripts/programs missed by the above
|
|
|
|
|
+ #
|
|
|
|
|
+ rm -f $BINDIR/diu_kiosk
|
|
|
|
|
+ cp -L DIUv2/diu_kiosk $BINDIR/
|
|
|
|
|
+
|
|
|
|
|
+ rm -f $BINDIR/reset-gps
|
|
|
|
|
+ cp -L scripts/reset-gps.py $BINDIR/reset-gps
|
|
|
|
|
+
|
|
|
|
|
+ # Indicate we have a Popufare installation
|
|
|
|
|
+ #
|
|
|
|
|
+ touch $CONFIGDIR/popufare.witness
|
|
|
|
|
+
|
|
|
|
|
+popd > /dev/null
|
|
|
|
|
|
|
|
sleep 1
|
|
sleep 1
|
|
|
touch /tmp/reboot_flag
|
|
touch /tmp/reboot_flag
|