46 lines
745 B
Bash
46 lines
745 B
Bash
#
|
|
#连接或者断开
|
|
#!/bin/sh
|
|
###全局变量
|
|
# $1 config file
|
|
# $2
|
|
|
|
|
|
|
|
. /bin/vs/cgi-bin/netenv.conf
|
|
|
|
while [ 1 ]
|
|
do
|
|
action=none
|
|
if [ -e /tmpfs/sysmon ]
|
|
then
|
|
action=`cat /tmpfs/sysmon`
|
|
if [ $action"A" = "A" ]
|
|
then
|
|
action=none
|
|
fi
|
|
fi
|
|
|
|
if [ $action == devsrejoin ]
|
|
then
|
|
echo "Rejoin DEVSearch"
|
|
/bin/vs/mcast.sh 5
|
|
rm /tmpfs/sysmon -f
|
|
elif [ $action == reboot ]
|
|
then
|
|
echo "TO REBOOT by sysmon"
|
|
sync
|
|
sleep 3
|
|
reboot
|
|
elif [ $action == WIFI_STA ]
|
|
then
|
|
echo "TO Enter STA mode"
|
|
sleep 1
|
|
/bin/vs/cgi-bin/wifi_networking.sh STA
|
|
rm /tmpfs/sysmon -f
|
|
fi
|
|
|
|
sleep 2
|
|
|
|
done
|