startup-pushover
This tool sends the hostname and all (hopefully) relevant IP addresses via pushover.
See below for setup instructions for systemd
based Linux distributions with a network configuration backend with proper support for
network-online.target (like Network Manager or systemd-networkd). Instructions for other operating systems are welcome, please send
pull requests .
Building
Install Go.
Get the source and all dependecies:
go get gitlab.com/hreese/startup-pushover
Build for local plattform:
go build -ldflags="-s -w" gitlab.com/hreese/startup-pushover
To cross compile, find the proper set of variables
and prepend them to the build command. For example, to build for Raspberry Pi 1, use
GOOS=linux GOARCH=arm GOARM=5 go build -ldflags="-s -w" gitlab.com/hreese/startup-pushover
Installation
Run everything as root (or prepend sudo to all commands).
Enable support for network-online.target. Run one of these:
# Network Manager
systemctl enable NetworkManager-wait-online.service
# systemd-networkd
systemctl enable systemd-networkd-wait-online.service
See the official documentation
and this Stackoverflow posting
for details.
Install the executable:
cp startup-pushover /usr/local/bin/
Copy the example config file:
cp example.startup-pushover.json /etc/startup-pushover.json
Get an API token and your recipient ID and fill them in:
editor /etc/startup-pushover.json
Copy the systemd service and enable it:
cp startup-pushover.service /etc/systemd/system
systemctl daemon-reload
systemctl enable --now startup-pushover.service