A script that uses the Github API to fetch the latest release of Syncthing Discovery- or Relay-Server.
The scripts replaces the server executables every time it runs with the latest version, regardless if there is a difference between the installed and downloaded version.
Errors are send to an administrator via email.
Bash scripts can be used as Cron jobs.
Works best on Centos 7 with stdisco and strelay as systemd services.
- Executables for relay and discovery server are in /usr/local/bin and are named stdiscosrv and strelaysrv.
- Systemd units named stdiscosrv.service and strelaysrv.service are set up.
- Running CENTOS 7 and Python3.6 is installed via Software Collections. If not, alter the Bash files and insert the path to the python3 executable.
- You can send emails with the sendmail command. If not, change the
LOG_ERRORS_TO_MAIL
variable in the python script toFalse
.
- Copy the python file to
/opt/updater
. - Copy the two Bash files to
/etc/cron.daily
. - Change the email addresses in the python script to meet your specific environment.