add: 打包脚本

This commit is contained in:
TsMask
2024-03-19 16:46:48 +08:00
parent 93754d1c1d
commit 2c6c3ab756
360 changed files with 39437 additions and 62 deletions

15
build/config/sh/cb_sms.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/expect
#This script is to invoke CB_SMS via debug command
spawn telnet 192.168.1.51 4965
send "x\n"
send "n\n"
sleep 1
send "\033\n"
send "vlr start cb_sms\n"
sleep 1
send "q\n"
exit

View File

@@ -0,0 +1,53 @@
#!/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