Update install.sh
This commit is contained in:
parent
bdba287552
commit
4cf61992ec
30
install.sh
30
install.sh
|
|
@ -32,11 +32,13 @@ git clone https://github.com/hp3icc/D-APRS.git
|
||||||
sudo cat > /bin/menu-igate <<- "EOF"
|
sudo cat > /bin/menu-igate <<- "EOF"
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
while : ; do
|
while : ; do
|
||||||
choix=$(whiptail --title "D-APRS KF7EEL / Raspbian Proyect HP3ICC Esteban Mackay 73." --menu "Suba o Baje con las flechas del teclado y seleccione el numero de opcion:" 16 65 5 \
|
choix=$(whiptail --title "D-APRS KF7EEL / Raspbian Proyect HP3ICC Esteban Mackay 73." --menu "Suba o Baje con las flechas del teclado y seleccione el numero de opcion:" 16 65 7 \
|
||||||
1 " Editar igate" \
|
1 " Editar igate" \
|
||||||
2 " Iniciar Igate " \
|
2 " Iniciar Igate " \
|
||||||
3 " Detener Igate " \
|
3 " Detener Igate " \
|
||||||
4 " Salir del menu " 3>&1 1>&2 2>&3)
|
4 " Dashboard on " \
|
||||||
|
5 " Dashboard off " \
|
||||||
|
6 " Salir del menu " 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
#on recupere ce choix
|
#on recupere ce choix
|
||||||
|
|
@ -55,6 +57,10 @@ sudo systemctl stop daprs.service && sudo systemctl start daprs.service && sudo
|
||||||
3)
|
3)
|
||||||
sudo systemctl stop daprs.service && sudo systemctl disable daprs.service ;;
|
sudo systemctl stop daprs.service && sudo systemctl disable daprs.service ;;
|
||||||
4)
|
4)
|
||||||
|
sudo systemctl stop daprs-board.service && systemctl start daprs-board.service && sudo systemctl enable daprs-board.service;;
|
||||||
|
5)
|
||||||
|
sudo systemctl stop daprs-board.service && sudo systemctl disable daprs-board.service ;;
|
||||||
|
6)
|
||||||
break;
|
break;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
@ -78,9 +84,29 @@ Restart=on-abort
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
#
|
||||||
|
sudo cat > /lib/systemd/system/daprs-board.service <<- "EOF"
|
||||||
|
[Unit]
|
||||||
|
Description=Dashboard D-APRS
|
||||||
|
After=network-online.target syslog.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
StandardOutput=null
|
||||||
|
WorkingDirectory=/opt/D-APRS/dashboard
|
||||||
|
RestartSec=3
|
||||||
|
ExecStart=/usr/bin/python3 /opt/D-APRS/dashboard/dashboard.py -c /opt/D-APRS/gps_data.cfg
|
||||||
|
Restart=on-abort
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
#
|
#
|
||||||
sudo chmod +777 /opt/D-APRS/user_settings.txt
|
sudo chmod +777 /opt/D-APRS/user_settings.txt
|
||||||
|
sudo chmod +x /opt/D-APRS/dashboard/dashboard.py
|
||||||
sudo chmod +x /opt/D-APRS/*.py
|
sudo chmod +x /opt/D-APRS/*.py
|
||||||
sudo chmod +x /bin/menu-igate
|
sudo chmod +x /bin/menu-igate
|
||||||
sudo chmod 755 /lib/systemd/system/daprs.service
|
sudo chmod 755 /lib/systemd/system/daprs.service
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue