summaryrefslogtreecommitdiff
path: root/shutdownasap.1.in
blob: bb327cd0baab7e28711c366a80663a4d51600259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.TH shutdownasap 1 "" "shutdownasap #VERSION#" ""
.SH NAME
shutdownasap \- simple script for \fBshutdown\fP waiting for certain processes and files to disapear
.SH SYNOPSIS
\fBshutdownasap [-q] [-r]\fP
.TP
\fB-q\fR
suppress output
.TP
\fB-r\fR
reboot instead of shutdown
\fB-R\fR
reboot instead of shutdown, if there is no shutdown scheduled yet
.SH DESCRIPTION
\fBshutdownasap\fP shuts down the computer after a certain directory becomes empty and certain processes are not running.
For actually shutting down it calls \fBsudo shutdown\fP or \fBsudo reboot\fP for reboot.
.SH CONFIGURATION
The configfile \fB#ETCDIR#/shutdownasap.conf\fP is a bash script, which defines the following variables and routines:
.TP
.B "tmpDir"
shared run-time directory for all instances
.TP
.B "waitForDir"
directory which must be empty before shutting down
.TP
.B "shutDownNoGoProcesses"
list of processes which must not be running before shutting down
.TP
.B "shutDownNoGoFiles"
list of files with process ids whose processes must not be running before shutting down
.TP
.B "beforeWatchHook"
routine which is called after start of \fBshutdownasap\fP, before watching above conditions
.TP
.B "additionalWatchHookFast"
routine which is called repeatedly to check if shutdown is safe (return 0) or not (return 1)
.TP
.B "additionalWatchHookSlow"
routine which is called to check if shutdown is safe (return 0) or not (return 1) when all other checks passed
.TP
.B "beforeShutDownHook"
routine which is called before shutting down
.SH FILES
.TP
.B "#BINDIR#/shutdownasap"
program file
.TP
.B "#ETCDIR#/shutdownasap.conf"
contains configuration
.SH AUTHOR
.nf
Erich Eckner <opensource at eckner dot net>
.fi