Skip to content

qaldak/system-update-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

system-update-notifier

Go Release Builder

Go Builder

Description

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.

Getting started

Download binary

Sysup-notifier binaries are available for amd64, armv7 or arm64. Ready to download from release.

amd64

wget -c https://github.com/qaldak/system-update-notifier/releases/download/1.1.1/system-update-notifier_1.1.1_linux_amd64.tar.gz

arm64

wget -c https://github.com/qaldak/system-update-notifier/releases/download/1.1.1/system-update-notifier_1.1.1_linux_arm64.tar.gz

armv7

wget -c https://github.com/qaldak/system-update-notifier/releases/download/1.1.1/system-update-notifier_1.1.1_linux_armv7.tar.gz

Configuration

.env File

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.

Execute

Command line

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

Cronjob

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.

Logfile

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.


Requirements

Go installation

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.

Root permissions

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.

Contribute

Contributions are welcome!

Licence

Unless otherwise specified, all code is released under the MIT License (MIT).
For used or linked components the respective license terms apply.

About

send notification if system updates are available

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages