NAME
SDD - Shutdown Daemon
VERSION
Version 0.04
SYNOPSIS
This is the core of the shutdown daemon script.
use SDD;
my $sdd = SDD->new( %args );
$sdd->start();
METHODS
new
Create new instance of SDD
PARAMS
- log_file <Str>
-
Path to log file Default: /var/log/sdd.log'
- log_level <Str>
-
Logging level (from Log::Log4perl). Valid are: DEBUG, INFO, WARN, ERROR Default: INFO
- verbose 1|0
-
If enabled, logging info will be printed to screen as well Default: 0
- test 1|0
-
If enabled shutdown will not actually be executed. Default: 0
- sleep_before_run <Int>
-
Time in seconds to sleep before running the monitors. e.g. to give the system time to boot, and not to shut down before users have started using the freshly started system. Default: 3600
- exit_after_trigger 1|0
-
If enabled will exit the application after a monitor has triggered. Normally it is a moot point, because if a monitor has triggered, then a shutdown is initialised, so the script will stop running anyway. Default: 0
- monitor HASHREF
-
A hash of monitor definitions. Each hash key must map to a Monitor module, and contain a hash with the parameters for the module.
- use_sudo 1|0
-
Use sudo for shutdown
sudo shutdown -h now
Default: 0
- shutdown_binary <Str>
-
The full path to the shutdown binary Default: /sbin/shutdown
Example (YAML formatted) configuration file
---
log_level: INFO
log_file: /var/log/sdd.log
shutdown_binary: /sbin/shutdown
exit_after_trigger: 0
sleep_before_run: 30
verbose: 0
use_sudo: 0
monitor:
hdparm:
loop_sleep: 60
disks:
- /dev/sdb
- /dev/sdc
- /dev/sdd
start
Start the shutdown daemon
AUTHOR
Robin Clarke, <perl at robinclarke.net>
BUGS
Please report any bugs or feature requests to bug-sdd at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SDD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc SDD
You can also look for information at:
Github
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2011 Robin Clarke.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.