Notify to Slack channel if system upgrades on Debian-based Linux are available.
On DietPi:
- for Dietpi upgrades, check /run/dietpi/.updates_available
- for apt upgrades, check /run/dietpi/.apt_updates
On Debian-based Linux checking updates by Apt package manager.
Sysup-notifier binaries are available for amd64, armv7 or arm64. Ready to download from release.
wget -c https://github.com/qaldak/system-update-notifier/releases/download/1.1.1/system-update-notifier_1.1.1_linux_amd64.tar.gz
wget -c https://github.com/qaldak/system-update-notifier/releases/download/1.1.1/system-update-notifier_1.1.1_linux_arm64.tar.gz
wget -c https://github.com/qaldak/system-update-notifier/releases/download/1.1.1/system-update-notifier_1.1.1_linux_armv7.tar.gz
Following variables has to be defined in .env
file for Slack notifications:
SLACK_AUTH_TOKEN={Foo}
SLACK_CHANNEL_ID={Bar}
The .env
file must be located in the working directory.
go run cmd/sysup-notifier/sysup-notifier.go [--log /path/to/logfile.log] [--debug]
or as binary executable:
./sysup-notifier [--log /path/to/logfile.log] [--debug]
optional parameter:
- "--log" creates logfile
- "--debug" set loglevel to DEBUG
05 0 * * * cd <CWD> ; go run cmd/sysup-notifier/sysup-notifier.go [--log /path/to/logfile.log] [--debug]
or as binary executable:
05 0 * * * cd <CWD> ; ./sysup-notifier [--log /path/to/logfile.log] [--debug]
Use Cronjob of root. For checking apt package manager sudo
is needed/used.
By default, Logfile is created in the subdirectory log/
of the working directory.
Logrotation is not supported. Use an external program like logrotate
.
In case you don't want create a logfile, you can set the option --log none
. Then no logfile will be created, but Stdout
is used.
For use, Go must be installed on the systems. Otherwise you have to build this code for your platform and run as a binary executable.
For checking apt package manager sudo permissions are needed. For this case, you have to use an user with sudo permissions. According your permission settings, you have to enter password for running the program..
For Cronjob: test first user settings or run the job under root user.
Contributions are welcome!
Unless otherwise specified, all code is released under the MIT License (MIT).
For used or linked components the respective license terms apply.