git add galmon.galmon-upgrade.timer galmon.galmon-upgrade.service
parent
64fe1cb072
commit
f6c7db73e4
|
@ -35,9 +35,12 @@ systemctl enable --now ubxtool@ttyACM3
|
|||
### Automatic Updates
|
||||
|
||||
Armbian and Raspbian have apt-daily timers enabled by default.
|
||||
However, most configurations for unattended installs require customization.
|
||||
|
||||
Sources should update randomly twice daily but actual package updates
|
||||
will be applied randomly during a one-hour window depending on computer timezone.
|
||||
A simple timer is included that will apply any galmon upgrades every three days:
|
||||
```sh
|
||||
systemctl enable --now galmon-upgrade.timer
|
||||
```
|
||||
|
||||
You can perform an immediate update by hand:
|
||||
```sh
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Upgrade Galmon Software
|
||||
After=network.target nss-lookup.target
|
||||
StartLimitIntervalSec=0
|
||||
# require that the configuration exists
|
||||
ConditionPathExists=/etc/default/galmon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=never
|
||||
ExecPreStart=-apt-get update
|
||||
ExecStart=-apt-get upgrade -y galmon
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Update galmon
|
||||
Documentation=man:ubxtool
|
||||
|
||||
[Timer]
|
||||
OnBootSec=3min
|
||||
OnUnitActiveSec=3d
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -35,11 +35,13 @@ fi
|
|||
|
||||
print_help_text() {
|
||||
echo "Galmon installation finished. If this is your first time, please:"
|
||||
echo " 1) Create a ubxtool configuration 2) Enabled the service"
|
||||
echo " 1) Create a ubxtool configuration 2) Enable the service"
|
||||
echo " 3) Enable the timer for automatic upgrades if you want"
|
||||
echo "Replace ttyACM0 below with your device listed in /dev"
|
||||
echo "Example: cp /etc/default/galmon /etc/default/ubxtool-ttyACM0"
|
||||
echo "Example: vi /etc/default/ubxtool-ttyACM0"
|
||||
echo "Example: systemctl enable --now ubxtool@ttyACM0"
|
||||
echo "Example: systemctl enable --now galmon-upgrade.timer"
|
||||
}
|
||||
|
||||
setup_user
|
||||
|
|
|
@ -15,6 +15,8 @@ override_dh_installinit:
|
|||
dh_installinit
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd --no-enable --no-start --name=galmon-upgrade galmon-upgrade.service
|
||||
dh_installsystemd --no-enable --no-start --name=galmon-upgrade galmon-upgrade.timer
|
||||
dh_installsystemd --no-enable --no-start --name=navnexus navnexus.service
|
||||
dh_installsystemd --no-enable --no-start --name=navrecv navrecv.service
|
||||
dh_installsystemd --no-enable --no-start --name=ubxtool@ ubxtool@.service
|
||||
|
|
Loading…
Reference in New Issue