shutdownasap(1)

NAME
shutdownasap - simple script for shutdown waiting for certain processes and files to disapear

SYNOPSIS
shutdownasap [-q] [-r]

-q  suppress output

-r  reboot instead of shutdown -R reboot instead of shutdown, if there is no shutdown scheduled yet

DESCRIPTION
shutdownasap shuts down the computer after a certain directory becomes empty and certain processes are not running. For actually shutting down it calls sudo shutdown or sudo reboot for reboot.

CONFIGURATION
The configfile /etc/shutdownasap.conf is a bash script, which defines the following variables and routines:

tmpDir
    shared run-time directory for all instances

waitForDir
    directory which must be empty before shutting down

shutDownNoGoProcesses
    list of processes which must not be running before shutting down

shutDownNoGoFiles
    list of files with process ids whose processes must not be running before shutting down

beforeWatchHook
    routine which is called after start of shutdownasap, before watching above conditions

additionalWatchHookFast
    routine which is called repeatedly to check if shutdown is safe (return 0) or not (return 1)

additionalWatchHookSlow
    routine which is called to check if shutdown is safe (return 0) or not (return 1) when all other checks passed

beforeShutDownHook
    routine which is called before shutting down

FILES

/usr/bin/shutdownasap
    program file

/etc/shutdownasap.conf
    contains configuration

AUTHOR
Erich Eckner <opensource at eckner dot net>