From: Robert E. W. <rbr...@co...> - 2011-09-11 21:29:40
|
First, I am very much a novice at bash scripting, so bare with me as I learn by doing. I found Salik Rafiq's blog (http://blog.chameeya.com/2011/08/backuppc-and-waking-machines.html) about waking his client machines with WOL and it worked perfectly. (I believe I may have posted that fact recently and failed to give Salik credit, sorry about that.) But, here are the recent changes. I placed my 'wolping.sh' in /usr/local/bin. This was done per Michael Stowe's suggestion on this forum. Thank you, Michael. I then gave it 'chmod 750 [filename]' permissions and 'chown backuppc:www-data' ownership. Then, as per Salik Rafiq's blog, remove the "NmbLookupFindHostCmd" string under the 'Backup Settings' tab of the _server_ config file. Then, via the 'Server' tab, changed the "PingPath" to /usr/local/bin/wolping.sh. This sufficiently wakes all my Linux client machines (that have already been setup to WOL. Check your distro for instructions.) Now, shutting down clients after BackupPC has completed that client's backup (whether it was incremental or full backup.) I have a small four computer household. Of the four (as of today) I only want to shutdown one of them after the client backup has completed. So, I simply placed '/usr/local/bin/shutdown.sh' into the client config file line "DumpPostUserCmd". That shutdown script is: "ssh -T root@[my client static IP address] /sbin/shutdown -h now >/dev/null" (minus the quotation marks, of course.) I now know that I can WOL a client and shut it down when the backup has completed. Now, time to refine and simplify my shutdown script. I have to study the manpage of ssh to see if "-T" means the same as the ">/dev/null" term at the end of the string. If I don't need both then . . . I am sure someone will have some thoughts and opinions? -- Robert Wooden Nashville, TN. USA Computer Freedom? . . . Linux |