54 lines
953 B
Bash
54 lines
953 B
Bash
#!/bin/bash
|
|
|
|
while true; do
|
|
|
|
timestamp=`date +%s`
|
|
|
|
filepath=~altouser/imsi.txt
|
|
if [ -f $filepath ];
|
|
then
|
|
filetimestamp=`stat -c %Y $filepath`
|
|
timegap=$(($timestamp-$filetimestamp))
|
|
if [ $timegap -gt 2 ]; then
|
|
mv $filepath /etc/edge/white_list.cfg
|
|
fi
|
|
fi
|
|
|
|
filepath=~altouser/dns.txt
|
|
if [ -f $filepath ];
|
|
then
|
|
filetimestamp=`stat -c %Y $filepath`
|
|
timegap=$(($timestamp-$filetimestamp))
|
|
if [ $timegap -gt 2 ]; then
|
|
mv $filepath /etc/edge/dns.txt
|
|
fi
|
|
fi
|
|
|
|
filepath=~altouser/osmo-bsc.cfg
|
|
if [ -f $filepath ];
|
|
then
|
|
filetimestamp=`stat -c %Y $filepath`
|
|
timegap=$(($timestamp-$filetimestamp))
|
|
if [ $timegap -gt 2 ]; then
|
|
mv $filepath /etc/edge/osmo-bsc.cfg
|
|
fi
|
|
fi
|
|
|
|
|
|
filepath=~altouser/cb_sms.cfg
|
|
if [ -f $filepath ];
|
|
then
|
|
filetimestamp=`stat -c %Y $filepath`
|
|
timegap=$(($timestamp-$filetimestamp))
|
|
if [ $timegap -gt 2 ]; then
|
|
mv $filepath /etc/edge/cb_sms.cfg
|
|
/usr/bin/cb_sms.sh
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
sleep 1
|
|
|
|
done
|