git add galmon.galmon-upgrade.timer galmon.galmon-upgrade.service

pull/91/head
Patrick Tudor 2020-01-24 22:24:13 -08:00
parent 64fe1cb072
commit f6c7db73e4
No known key found for this signature in database
GPG Key ID: 2C12D022F591B853
5 changed files with 35 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,10 @@
[Unit]
Description=Update galmon
Documentation=man:ubxtool
[Timer]
OnBootSec=3min
OnUnitActiveSec=3d
[Install]
WantedBy=timers.target

View File

@ -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

2
debian/rules vendored
View File

@ -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