API Docs | Ninja Blocks

The Ninja Blocks REST API is implemented as JSON over HTTP using the GET/POST/PUT/DELETE verbs. Each resource, like Block, Device, User or Rule, has its own URL and is manipulated in isolation. In other words, we’ve tried to make the API follow the REST principles as much as possible. via API Docs | Ninja Blocks.

Get a listing of postgres databases

psql -U postfix -h localhost -l -t | awk ‘/^ [a-zA-Z]+/ { print $1; }’ | grep -v ‘^\(template0\)’ | while read DBNAME do … done   #! /bin/sh # Keep n days worth of backups GENERATIONS=180 BACKUP_DIR=”/var/backups/generational/pgsql”; BACKUP_CURRENT=”/var/backups/pgsql”; DATE=`date +’%Y%m%d’` HOSTNAME=`hostname` DBUSER=”postgres” # load defaults, over-riding script supplied values [ -f /etc/default/pgbackup ] && . …

More