mirror of https://gitlab.com/hp3icc/emq-TE1.git
Update menu-xlx
This commit is contained in:
parent
b6b69047aa
commit
d40657bdbb
|
|
@ -464,7 +464,8 @@ if [ -f "/etc/nginx/sites-enabled/000" ]; then
|
|||
rm /etc/nginx/sites-enabled/000
|
||||
fi
|
||||
sudo systemctl restart nginx
|
||||
|
||||
XRFNUM=$(grep "XLX-XRFNUM:" $wdp | grep -oP 'XLX-XRFNUM:\s*\K.*')
|
||||
AMBIP=$(grep "XLX-AMBIP:" $wdp | grep -oP 'XLX-AMBIP:\s*\K.*')
|
||||
LOCAL_IP=$(ip a | grep inet | grep "eth0\|en" | awk '{print $2}' | tr '/' ' ' | awk '{print $1}')
|
||||
cp /opt/xlxd/scripts/xlxd /etc/init.d/xlxd
|
||||
sed -i "s|ARGUMENTS=.*|ARGUMENTS=\"$XRFNUM $LOCAL_IP $AMBIP\"|g" /etc/init.d/xlxd
|
||||
|
|
@ -541,7 +542,6 @@ fi
|
|||
;;
|
||||
esac
|
||||
|
||||
wdp=/opt/wdp10
|
||||
wsn0=$(grep "Web-Dashboar-name:" $wdp | grep -oP 'Web-Dashboar-name:\s*\K.*')
|
||||
if [ -f "/etc/nginx/sites-enabled/$wsn0" ]; then
|
||||
rm /etc/nginx/sites-enabled/$wsn0
|
||||
|
|
@ -550,6 +550,8 @@ if [ -f "/etc/nginx/sites-enabled/000" ]; then
|
|||
rm /etc/nginx/sites-enabled/000
|
||||
fi
|
||||
sudo systemctl restart nginx
|
||||
sudo systemctl disable rebooter-xlxd.service
|
||||
sudo systemctl stop rebooter-xlxd.service
|
||||
if [ -f "/etc/init.d/xlxd" ]; then
|
||||
systemctl stop xlxd
|
||||
fi
|
||||
|
|
@ -557,7 +559,6 @@ if [ -f "/etc/init.d/xlxd" ]; then
|
|||
rm /etc/init.d/xlxd
|
||||
fi
|
||||
sudo update-rc.d -f xlxd remove
|
||||
#
|
||||
wd0p=$(grep "Web-Dashboar-Port:" $wdp | grep -oP 'Web-Dashboar-Port:\s*\K.*')
|
||||
if [ -z "$wd0p" ]
|
||||
then wd0p=80
|
||||
|
|
@ -581,11 +582,9 @@ if [ -f "/etc/nginx/sites-enabled/000" ]; then
|
|||
rm /etc/nginx/sites-enabled/000
|
||||
fi
|
||||
sudo systemctl restart nginx
|
||||
|
||||
XRFNUM=$(grep "XLX-XRFNUM:" $wdp | grep -oP 'XLX-XRFNUM:\s*\K.*')
|
||||
AMBIP=$(grep "XLX-AMBIP:" $wdp | grep -oP 'XLX-AMBIP:\s*\K.*')
|
||||
LOCAL_IP=$(ip a | grep inet | grep "eth0\|en" | awk '{print $2}' | tr '/' ' ' | awk '{print $1}')
|
||||
if [ -z "$LOCAL_IP" ]; then
|
||||
LOCAL_IP=$(ip a | grep inet | grep "wlan0\|en" | awk '{print $2}' | tr '/' ' ' | awk '{print $1}')
|
||||
fi
|
||||
cp /opt/xlxd/scripts/xlxd /etc/init.d/xlxd
|
||||
sed -i "s|ARGUMENTS=.*|ARGUMENTS=\"$XRFNUM $LOCAL_IP $AMBIP\"|g" /etc/init.d/xlxd
|
||||
sudo update-rc.d xlxd defaults &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue