This commit is contained in:
Esteban Mackay Q 2023-10-03 21:37:27 -05:00
parent fef5ab5694
commit 06ed85d7cb
2 changed files with 57 additions and 113 deletions

View File

@ -35,66 +35,37 @@ fi
# case : action en fonction du choix # case : action en fonction du choix
case $choix in case $choix in
1) 1)
sudo systemctl stop md380-emu.service #!/bin/bash
sudo systemctl stop analog_bridge.service
sudo systemctl stop mmdvm_bridge.service
sudo systemctl stop nxdngateway.service
sudo systemctl stop p25gateway.service
sudo systemctl stop ysfgateway.service
sudo systemctl stop quantar_bridge.service
sudo systemctl stop ircddbgatewayd.service
sudo systemctl stop p25parrot.service
sudo systemctl stop ysfparrot.service
sudo systemctl stop nxdnparrot.service
sudo systemctl start md380-emu.service # Lista de servicios a reiniciar
sudo systemctl start analog_bridge.service servicios=("md380-emu.service" "analog_bridge.service" "mmdvm_bridge.service" "nxdngateway.service" "p25gateway.service" "ysfgateway.service" "quantar_bridge.service" "ircddbgatewayd.service" "p25parrot.service" "ysfparrot.service" "nxdnparrot.service")
sudo systemctl start mmdvm_bridge.service
sudo systemctl start nxdngateway.service
sudo systemctl start p25gateway.service
sudo systemctl start ysfgateway.service
sudo systemctl start quantar_bridge.service
sudo systemctl start ircddbgatewayd.service
sudo systemctl start p25parrot.service
sudo systemctl start ysfparrot.service
sudo systemctl start nxdnparrot.service
sudo systemctl start ircddbgatewayd.service
sudo systemctl enable md380-emu.service # Recorre la lista de servicios y verifica si están activos
sudo systemctl enable analog_bridge.service for servicio in "${servicios[@]}"; do
sudo systemctl enable mmdvm_bridge.service if systemctl status "$servicio" | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl enable nxdngateway.service echo "restart $servicio"
sudo systemctl enable p25gateway.service sudo systemctl restart "$servicio"
sudo systemctl enable ysfgateway.service else
sudo systemctl enable quantar_bridge.service echo "start $servicio"
sudo systemctl enable ircddbgatewayd.service sudo systemctl restart "$servicio"
sudo systemctl enable p25parrot.service sudo systemctl enable "$servicio"
sudo systemctl enable ysfparrot.service fi
sudo systemctl enable nxdnparrot.service ;; done
;;
2) 2)
sudo systemctl stop md380-emu.service #!/bin/bash
sudo systemctl stop analog_bridge.service
sudo systemctl stop mmdvm_bridge.service
sudo systemctl stop nxdngateway.service
sudo systemctl stop p25gateway.service
sudo systemctl stop ysfgateway.service
sudo systemctl stop quantar_bridge.service
sudo systemctl stop ircddbgatewayd.service
sudo systemctl stop p25parrot.service
sudo systemctl stop ysfparrot.service
sudo systemctl stop nxdnparrot.service
sudo systemctl disable md380-emu.service # Lista de servicios a reiniciar
sudo systemctl disable analog_bridge.service servicios=("md380-emu.service" "analog_bridge.service" "mmdvm_bridge.service" "nxdngateway.service" "p25gateway.service" "ysfgateway.service" "quantar_bridge.service" "ircddbgatewayd.service" "p25parrot.service" "ysfparrot.service" "nxdnparrot.service")
sudo systemctl disable mmdvm_bridge.service
sudo systemctl disable nxdngateway.service # Recorre la lista de servicios y verifica si están activos
sudo systemctl disable p25gateway.service for servicio in "${servicios[@]}"; do
sudo systemctl disable ysfgateway.service if systemctl status "$servicio" | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl disable quantar_bridge.service echo "stop $servicio"
sudo systemctl disable ircddbgatewayd.service sudo systemctl disable "$servicio"
sudo systemctl disable p25parrot.service sudo systemctl stop "$servicio"
sudo systemctl disable ysfparrot.service fi
sudo systemctl disable nxdnparrot.service done
rm /var/log/mmdvm/*;; rm /var/log/mmdvm/*;;
3) 3)
sudo /usr/local/dvs/dvs ;; sudo /usr/local/dvs/dvs ;;
@ -207,66 +178,37 @@ fi
# case : action en fonction du choix # case : action en fonction du choix
case $choix in case $choix in
1) 1)
sudo systemctl stop md380-emu.service #!/bin/bash
sudo systemctl stop analog_bridge.service
sudo systemctl stop mmdvm_bridge.service
sudo systemctl stop nxdngateway.service
sudo systemctl stop p25gateway.service
sudo systemctl stop ysfgateway.service
sudo systemctl stop quantar_bridge.service
sudo systemctl stop ircddbgatewayd.service
sudo systemctl stop p25parrot.service
sudo systemctl stop ysfparrot.service
sudo systemctl stop nxdnparrot.service
sudo systemctl start md380-emu.service # Lista de servicios a reiniciar
sudo systemctl start analog_bridge.service servicios=("md380-emu.service" "analog_bridge.service" "mmdvm_bridge.service" "nxdngateway.service" "p25gateway.service" "ysfgateway.service" "quantar_bridge.service" "ircddbgatewayd.service" "p25parrot.service" "ysfparrot.service" "nxdnparrot.service")
sudo systemctl start mmdvm_bridge.service
sudo systemctl start nxdngateway.service
sudo systemctl start p25gateway.service
sudo systemctl start ysfgateway.service
sudo systemctl start quantar_bridge.service
sudo systemctl start ircddbgatewayd.service
sudo systemctl start p25parrot.service
sudo systemctl start ysfparrot.service
sudo systemctl start nxdnparrot.service
sudo systemctl start ircddbgatewayd.service
sudo systemctl enable md380-emu.service # Recorre la lista de servicios y verifica si están activos
sudo systemctl enable analog_bridge.service for servicio in "${servicios[@]}"; do
sudo systemctl enable mmdvm_bridge.service if systemctl status "$servicio" | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl enable nxdngateway.service echo "restart $servicio"
sudo systemctl enable p25gateway.service sudo systemctl restart "$servicio"
sudo systemctl enable ysfgateway.service else
sudo systemctl enable quantar_bridge.service echo "start $servicio"
sudo systemctl enable ircddbgatewayd.service sudo systemctl restart "$servicio"
sudo systemctl enable p25parrot.service sudo systemctl enable "$servicio"
sudo systemctl enable ysfparrot.service fi
sudo systemctl enable nxdnparrot.service ;; done
;;
2) 2)
sudo systemctl stop md380-emu.service #!/bin/bash
sudo systemctl stop analog_bridge.service
sudo systemctl stop mmdvm_bridge.service
sudo systemctl stop nxdngateway.service
sudo systemctl stop p25gateway.service
sudo systemctl stop ysfgateway.service
sudo systemctl stop quantar_bridge.service
sudo systemctl stop ircddbgatewayd.service
sudo systemctl stop p25parrot.service
sudo systemctl stop ysfparrot.service
sudo systemctl stop nxdnparrot.service
sudo systemctl disable md380-emu.service # Lista de servicios a reiniciar
sudo systemctl disable analog_bridge.service servicios=("md380-emu.service" "analog_bridge.service" "mmdvm_bridge.service" "nxdngateway.service" "p25gateway.service" "ysfgateway.service" "quantar_bridge.service" "ircddbgatewayd.service" "p25parrot.service" "ysfparrot.service" "nxdnparrot.service")
sudo systemctl disable mmdvm_bridge.service
sudo systemctl disable nxdngateway.service # Recorre la lista de servicios y verifica si están activos
sudo systemctl disable p25gateway.service for servicio in "${servicios[@]}"; do
sudo systemctl disable ysfgateway.service if systemctl status "$servicio" | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl disable quantar_bridge.service echo "stop $servicio"
sudo systemctl disable ircddbgatewayd.service sudo systemctl disable "$servicio"
sudo systemctl disable p25parrot.service sudo systemctl stop "$servicio"
sudo systemctl disable ysfparrot.service fi
sudo systemctl disable nxdnparrot.service done
rm /var/log/mmdvm/*;; rm /var/log/mmdvm/*;;
3) 3)
sudo /usr/local/dvs/dvs ;; sudo /usr/local/dvs/dvs ;;

View File

@ -21,6 +21,8 @@ case $choix in
1) 1)
bash -c "$(curl -fsSL https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/update-dash-dvs.sh)" ;; bash -c "$(curl -fsSL https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/update-dash-dvs.sh)" ;;
2) 2)
clean
echo "Update Host files - please wait"
sudo /usr/local/sbin/DVSM_Update.sh && sudo /usr/local/sbin/DVSM_Update.sh &&
#!/bin/bash #!/bin/bash
@ -30,7 +32,7 @@ servicios=("mmdvm_bridge.service" "nxdngateway.service" "p25gateway.service" "ys
# Recorre la lista de servicios y verifica si están activos # Recorre la lista de servicios y verifica si están activos
for servicio in "${servicios[@]}"; do for servicio in "${servicios[@]}"; do
if systemctl status "$servicio" | grep "Active: active" >/dev/null 2>&1; then if systemctl status "$servicio" | grep "Active: active" >/dev/null 2>&1; then
# echo "Reiniciando el servicio $servicio" echo "Reiniciando el servicio $servicio"
sudo systemctl restart "$servicio" sudo systemctl restart "$servicio"
fi fi
done done