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
# Verifica si el archivo del servicio existe antes de intentar eliminarlo
if [ -f /lib/systemd/system/"$servicio" ]; then
sudo rm /lib/systemd/system/"$servicio"
fi
done
#sudo cat > /lib/systemd/system/adn-parrot.service <<- "EOF"
#[Unit]
#Description=Freedmr Parrot
#After=network-online.target syslog.target
#Wants=network-online.target
[Service] #[Service]
User=root #User=root
Type=simple #Type=simple
Restart=always #Restart=always
RestartSec=3 #RestartSec=3
StandardOutput=null #StandardOutput=null
WorkingDirectory=/opt/ADN-DMR-Peer-Server #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 #ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/playback.py -c /opt/ADN-DMR-Peer-Server/config/parrot.cfg
#Restart=on-abort
#Restart=on-failure
[Install]
WantedBy=multi-user.target
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.