#!/bin/sh # # Take the system down for backups and then bring it back up. # Expects a single (possibly empty) argument X which is used to select # a file /etc/backup/warnings.X. This file will contain lines like: # T 300 "in 10 minutes" # T 240 "in 5 minutes" # T 45 "in 1 minute" # T 15 "in 15 seconds" # configuring the frequency of warning messages. If you call the # files 'warnings.soon', 'warnings.now' and 'warnings.' then # you can invoke this as: # takedown lots of warnings # takedown soon not so many warnings # takedown now no warning at all set -e cd /etc/backup host="`hostname`" || true T () { ( exec wall <