|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #!/bin/sh
-
-
-
-
-
-
-
-
-
-
-
- SNIFFER_PATH=/var/CommuniGate/CGPSNF
- SNF2CHECK=$SNIFFER_PATH/SNF2Check
- AUTHENTICATION=authenticationxx
- LICENSE_ID=licenseid
-
-
-
-
-
- cd $SNIFFER_PATH
-
- if [ -e UpdateReady.txt ] && [ ! -e UpdateReady.lck ]; then
-
-
-
-
-
-
- curl http://www.sortmonster.net/Sniffer/Updates/$LICENSE_ID.snf --output $LICENSE_ID.new --compressed --user sniffer:ki11sp8m --remote-time --fail
-
- $SNF2CHECK $LICENSE_ID.new $AUTHENTICATION
- RETVAL=$?
- if [ $RETVAL -eq 0 ]; then
-
- if [ -e $LICENSE_ID.old ]; then rm -f $LICENSE_ID.old; fi
- if [ -e $LICENSE_ID.snf ]; then mv $LICENSE_ID.snf $LICENSE_ID.old; fi
- mv $LICENSE_ID.new $LICENSE_ID.snf
-
- if [ -e UpdateReady.txt ]; then rm -f UpdateReady.txt; fi
- if [ -e UpdateReady.lck ]; then rm -f UpdateReady.lck; fi
-
- else
-
- if [ -e $LICENSE_ID.new ]; then rm -f $LICENSE_ID.new; fi
- if [ -e UpdateReady.lck ]; then rm -f UpdateReady.lck; fi
-
- fi
- fi
-
|