polldot

command module
v0.0.0-...-3e9ce2b Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: GPL-3.0 Imports: 11 Imported by: 0

README

polldot

polldot is a Go program that regularly polls a remote http file. If the file exists and starts with '.' (without the quotes), polldot sends a mail and exits. Never more than one mail is sent.

If the file cannot be retrieved, or if it starts with something else than '.', the program undertakes no action and sleeps until next cycle.

The URL of the file, the mail settings (To, From, mailserver, etc) and the frequency of polling for the file are configurable via a configuration file ~/.polldot.json. Program execution is logged to ~/polldot.log. The configuration will be loaded on startup or if a SIGHUP signal is received.

The program exits when any one of these things has happened: * the file is retrieved and starts with a dot '.' * upon receipt of SIGINT, SIGTERM or SIGUSR1

Documentation

Overview

polldot regularly polls for the existence and contents of file. The file is expected to be offered online by a webserver.

If the file exists and contains '.' (without the quotes), a mail is sent.After sending the mail, the program exits. Never more than one mail is sent.

If the file cannot be retreived, or if it contains something else than '.', the program undertakes no action and waits for a while cycle to try again.

The URL of the file, the mail settings (To, From, mailserver, etc) and the frequency of polling for the file are configurable via a configuration file ~/.polldot.json. Program execution is logged to ~/polldot.log.

The configuration will be loaded on startup and when sending the program a SIGHUP signal. The program exits when any one of these things has happened: - the file is retreived and starts with a dot '.' - the program receives SIGINT, SIGTERM or SIGUSR1

Directories

Path Synopsis
Package config loads the configuration for polldot.
Package config loads the configuration for polldot.

Jump to

Keyboard shortcuts

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