mirror of https://gitlab.com/hp3icc/emq-TE1.git
update
This commit is contained in:
parent
168f51239e
commit
945f297a53
|
|
@ -131,6 +131,8 @@ sed -i 's/www\/html/www\/dvs/g' /var/lib/dpkg/info/dvswitch*
|
|||
sed -i "s/Language=en_US/Language=es_ES/g" /opt/NXDNGateway/NXDNGateway.ini
|
||||
sed -i "s/Language=en_US/Language=es_ES/g" /opt/P25Gateway/P25Gateway.ini
|
||||
#
|
||||
cp /var/www/dvs/index.php /var/www/dvs/index.txt
|
||||
#
|
||||
sudo cat > /opt/MMDVM_Bridge/MMDVM_Bridge.ini <<- "EOF"
|
||||
[General]
|
||||
Callsign=N0CALL
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ choix=$(whiptail --title "Raspbian Proyect HP3ICC Menu DVSwitch" --menu "Nota :
|
|||
4 " Cambiar Puerto http de Dashboard " \
|
||||
5 " Dashboard on " \
|
||||
6 " Dashboard off " \
|
||||
7 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||
7 " Remove Buttons Dashboard " \
|
||||
8 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
#on recupere ce choix
|
||||
#exitstatus=$?
|
||||
|
|
@ -119,6 +120,7 @@ else
|
|||
fi
|
||||
fi ;;
|
||||
5)
|
||||
cp /var/www/dvs/index.txt /var/www/dvs/index.php
|
||||
if sudo systemctl status http.server-dvs.service |grep "service; enabled;" >/dev/null 2>&1
|
||||
then
|
||||
sudo systemctl disable http.server-dvs.service
|
||||
|
|
@ -146,6 +148,33 @@ fi ;;
|
|||
6)
|
||||
sudo systemctl stop http.server-dvs.service && sudo systemctl disable http.server-dvs.service ;;
|
||||
7)
|
||||
cp /var/www/dvs/index.txt /var/www/dvs/index.php &&
|
||||
sed -i '111,203{/^$/!s/^/\/\/ /}' /var/www/dvs/index.php
|
||||
if sudo systemctl status http.server-dvs.service |grep "service; enabled;" >/dev/null 2>&1
|
||||
then
|
||||
sudo systemctl disable http.server-dvs.service
|
||||
fi
|
||||
if sudo systemctl status http.server-dvs.service |grep active >/dev/null 2>&1
|
||||
then
|
||||
sudo systemctl stop http.server-dvs.service
|
||||
fi
|
||||
variable80=$(grep "Web-Dashboar-Port:" /opt/wdp3 | grep -Eo '[A.0-9]{1,9}')
|
||||
if [ -z "$variable80" ]
|
||||
then variable80=80
|
||||
|
||||
fi
|
||||
sudo sed -i "s/ExecStart=.*/ExecStart=php -S 0.0.0.0:$variable80 -t \/var\/www\/dvs\//g" /lib/systemd/system/http.server-dvs.service &&
|
||||
systemctl daemon-reload &&
|
||||
if sudo netstat -tuln | grep -q "0.0.0.0:$variable80 "; then
|
||||
whiptail --title "Check Port" --msgbox "El puerto $variable80 esta ocupado , The port $variable80 is busy" 0 50
|
||||
else
|
||||
if ! sudo systemctl status http.server-dvs.service |grep "service; enabled;" >/dev/null 2>&1
|
||||
then
|
||||
sudo systemctl enable http.server-dvs.service
|
||||
fi
|
||||
sudo systemctl start http.server-dvs.service
|
||||
fi ;;
|
||||
8)
|
||||
break;
|
||||
esac
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in New Issue