Update install.sh

merge-requests/1/head
Esteban Mackay Q. 10 months ago
parent 2ca81a2937
commit 1e78e69c51

@ -97,6 +97,14 @@ for servicio in $SERVICIOS; do
fi fi
done done
if [ -f "/lib/systemd/system/adn-parrot.service" ];
then
rm /lib/systemd/system/adn-parrot.service
fi
if [ -f "/lib/systemd/system/adn_parrot.service" ];
then
rm /lib/systemd/system/adn_parrot.service
fi
if [ -f "/lib/systemd/system/fdmrparrot.service" ]; if [ -f "/lib/systemd/system/fdmrparrot.service" ];
then then
rm /lib/systemd/system/fdmrparrot.service rm /lib/systemd/system/fdmrparrot.service
@ -486,27 +494,41 @@ WantedBy=multi-user.target
EOF EOF
### ###
sudo cat > /lib/systemd/system/adn-parrot.service <<- "EOF" servicios="adn-parrot.service adn_parrot.service fdmrparrot.service"
[Unit]
Description=Freedmr Parrot # Recorre la lista de servicios y deshabilita y detiene sin enviar mensaje
After=network-online.target syslog.target for servicio in $servicios; do
Wants=network-online.target # Verifica si el servicio existe antes de intentar deshabilitarlo y detenerlo
if systemctl list-unit-files --type=service | grep -q "^$servicio"; then
sudo systemctl disable --quiet "$servicio"
sudo systemctl stop --quiet "$servicio"
fi
[Service] # Verifica si el archivo del servicio existe antes de intentar eliminarlo
User=root if [ -f /lib/systemd/system/"$servicio" ]; then
Type=simple sudo rm /lib/systemd/system/"$servicio"
Restart=always fi
RestartSec=3 done
StandardOutput=null #sudo cat > /lib/systemd/system/adn-parrot.service <<- "EOF"
WorkingDirectory=/opt/ADN-DMR-Peer-Server #[Unit]
ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/playback.py -c /opt/ADN-DMR-Peer-Server/config/parrot.cfg #Description=Freedmr Parrot
#Restart=on-abort #After=network-online.target syslog.target
#Restart=on-failure #Wants=network-online.target
[Install] #[Service]
WantedBy=multi-user.target #User=root
#Type=simple
#Restart=always
#RestartSec=3
#StandardOutput=null
#WorkingDirectory=/opt/ADN-DMR-Peer-Server
#ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/playback.py -c /opt/ADN-DMR-Peer-Server/config/parrot.cfg
EOF
#[Install]
#WantedBy=multi-user.target
#EOF
# #
sudo cat > /lib/systemd/system/fdmr_mon.service <<- "EOF" sudo cat > /lib/systemd/system/fdmr_mon.service <<- "EOF"
[Unit] [Unit]

Loading…
Cancel
Save

Powered by TurnKey Linux.