This project uses systemd and a simple bash script to send Discord notifications when a linux system starts up and successfully connects to the internet. I use this on a PoE-powered Raspberry Pi to alert me when a power outage is resolved and my network connectivity is restored.
- clone this git repository on the system for which you wish to enable startup notifications
- on the Discord server you wish to receive notifications from go to Server Settings > Integrations
- create a new webhook - name it whatever you wish and set the channel it will post to
- copy the webhook URL
- create a file called
.envin the project directory and add a lineWEBHOOK_URL="<url>"replacing<url>with the URL copied from Discord - run the
install-service.shscript - this will installdiscord-startup-notify.serviceto/etc/systemd/system/and enable the serivce viasystemctl(requiressudoaccess) - restart your system to test