startup-pushover

command module
v0.0.0-...-810db36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL