Update menu-fdmr

This commit is contained in:
RaspbianProyect by HP3ICC 2023-07-29 01:46:17 +00:00
parent e683790dfe
commit 9d0e60d5a2
1 changed files with 9 additions and 9 deletions

View File

@ -38,6 +38,14 @@ sudo nano /opt/FDMR-Monitor/fdmr-mon.cfg ;;
sudo nano /opt/FDMR-Monitor2/fdmr-mon.cfg ;;
5)
sudo nano /opt/wdp &&
if sudo systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1
then
sudo systemctl stop http.server-fdmr.service
fi &&
if sudo systemctl status http.server-fdmr2.service |grep active >/dev/null 2>&1
then
sudo systemctl stop http.server-fdmr2.service
fi &&
variable1=$(grep "Web-Dashboar-Port:" /opt/wdp | grep -Eo '[A.0-9]{1,9}') &&
if [ -z "$variable1" ]
then variable1=80
@ -46,14 +54,6 @@ fi &&
sudo sed -i "s/ExecStart=.*/ExecStart=php -S 0.0.0.0:$variable1 -t \/var\/www\/fdmr\//g" /lib/systemd/system/http.server-fdmr.service &&
sudo sed -i "s/ExecStart=.*/ExecStart=php -S 0.0.0.0:$variable1 -t \/var\/www\/fdmr2\//g" /lib/systemd/system/http.server-fdmr2.service &&
systemctl daemon-reload &&
if sudo systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1
then
sudo systemctl stop http.server-fdmr.service
fi
if sudo systemctl status http.server-fdmr2.service |grep active >/dev/null 2>&1
then
sudo systemctl stop http.server-fdmr2.service
fi
if sudo systemctl status http.server-fdmr.service |grep "service; enabled;" >/dev/null 2>&1
then
sudo systemctl start http.server-fdmr.service
@ -301,4 +301,4 @@ exit 0
EOF
################
sudo chmod +x /bin/menu*
sudo chmod +x /bin/menu*