Update menu-fdmr

This commit is contained in:
Esteban Mackay Q 2023-10-03 21:46:04 -05:00
parent 06ed85d7cb
commit f3a0ba8c68
1 changed files with 19 additions and 26 deletions

View File

@ -21,17 +21,16 @@ fi
while : ; do
choix=$(whiptail --title "Raspbian Proyect HP3ICC FDMR+" --menu "move up or down with the keyboard arrows and select your option by pressing enter:" 23 56 13 \
1 " Edit FreeDMR Server " \
2 " Edit Interlink " \
3 " Edit FDMR-Monitor OA4DOA " \
4 " Edit FDMR-Monitor CS8ABG " \
5 " Select Web Dashboard Port " \
6 " Start-Restart FreeDMR Server " \
7 " Stop FreeDMR SERVER " \
8 " Select Dashboard OA4DOA" \
9 " Select Dashboard CS8ABG" \
10 " Stop Dashboard " \
11 " D-APRS " \
12 " Menu update " 3>&1 1>&2 2>&3)
2 " Edit FDMR-Monitor OA4DOA " \
3 " Edit FDMR-Monitor CS8ABG " \
4 " Select Web Dashboard Port " \
5 " Start-Restart FreeDMR Server " \
6 " Stop FreeDMR SERVER " \
7 " Select Dashboard OA4DOA" \
8 " Select Dashboard CS8ABG" \
9 " Stop Dashboard " \
10 " D-APRS " \
11 " Menu update " 3>&1 1>&2 2>&3)
exitstatus=$?
#on recupere ce choix
#exitstatus=$?
@ -49,16 +48,10 @@ if sudo systemctl status freedmr.server-fdmr.service |grep "service; enabled;" >
sudo systemctl restart freedmr.service
fi;;
2)
sudo nano /opt/FreeDMR/config/rules.py &&
if sudo systemctl status freedmr.server-fdmr.service |grep "service; enabled;" >/dev/null 2>&1
then
sudo systemctl restart freedmr.service
fi ;;
3)
sudo nano /opt/FDMR-Monitor/fdmr-mon.cfg ;;
4)
3)
sudo nano /opt/FDMR-Monitor2/fdmr-mon.cfg ;;
5)
4)
sudo nano /opt/wdp &&
if sudo systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1
then
@ -89,7 +82,7 @@ else
fi
fi
fi ;;
6)
5)
if ! systemctl status mariadb.service |grep "Active: active" >/dev/null 2>&1
then sudo systemctl restart mariadb.service
@ -125,7 +118,7 @@ fi
sudo systemctl start freedmr.service
sudo systemctl start fdmrparrot.service
sudo systemctl start proxy.service ;;
7)
6)
sudo systemctl stop fdmrparrot.service
sudo systemctl disable fdmrparrot.service
sudo systemctl stop proxy.service
@ -158,7 +151,7 @@ else
fi
fi
;;
8)
7)
if systemctl status http.server-fdmr.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable http.server-fdmr.service
@ -242,7 +235,7 @@ else
sudo systemctl start http.server-fdmr.service
sudo systemctl enable http.server-fdmr.service
fi ;;
9)
8)
if systemctl status http.server-fdmr.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable http.server-fdmr.service
@ -326,7 +319,7 @@ else
sudo systemctl start http.server-fdmr2.service
sudo systemctl enable http.server-fdmr2.service
fi ;;
10)
9)
(crontab -l | grep -v "rm /opt/FDMR-Monitor2/data/*") | crontab -
(crontab -l | grep -v "rm /opt/FDMR-Monitor/data/*") | crontab -
(crontab -l | grep -v "sh /opt/FDMR-Monitor/sysinfo/cpu.sh") | crontab -
@ -365,9 +358,9 @@ else
fi
fi
;;
11)
10)
menu-igate ;;
12)
11)
bash -c "$(curl -fsSL https://gitlab.com/hp3icc/fdmr/-/raw/main/update.sh)";
esac
done