Nick Pierpoint wrote:
Hello everyone.
I'm looking for a way to automatically shutdown my computers on my small
home network following a backup.
i.e.
1. Amanda completes backup run
2. Backed-up clients shutdown
3. Amanda server shutdown
Thanks for any pointers.
Hi Nick
a possible suggestion is to write a shell scipt and as a command add to
a cron job for all your computers.
Thus create a user with neccessary permissions to start and shutdown
services But not as Root
Well I don't by convention it is not wise to run cron jobs if your
server or client is exposed to the Wild Wild West.
Example of a shell script::
#!/bash/sh
# shutdown-pcs.sh Created YYMMDD By ***
# Save hack to /usr/local/bin and ensure your user has permissions to
run from this path or any other you decide.
# Or you can use sudo.
# Simple hack to shutdown computer after Amanda backup run.
# chmod o+x or 775
# Preferable a User with sufficent permissions.
echo "Shutting down computer"
shutdown -h now
Thus run crontab -e -u admin
Example of a cron job for your privillege user say for instance user admin
# Shutting down computer
30 19 * * * /usr/local/bin/shutdown-pcs.sh
Cheers
Cheers
|