I'm new to this forum; please excuse any faux pas. I've been using
rsync fired by a LaunchDaemon written in
tcsh for several years now. It worked great on my 2008 MacBook Pro under Snow Leopard. I now have a 2014 MBP running Yosemite. I've cleared up a few conflicts, but one continues to elude me. My script works like this:
- I mount an external drive.
launchdstarts my script
- My script verifies that the right drive is available.
- My script copies some folders from my wife's computer to mine and from mine to hers.
- My script sends a
shutdowncommand to my wife's computer.
- My script copies some folders from our backup computer to mine and from mine to it.
- My script sends a
shutdowncommand to our backup computer.
- My script copies some folders from my computer to the external drive.
My script sends a
shutdowncommand to my computer.
As I said, this worked fine for several years under Snow Leopard. Now that I'm running Yosemite, steps 4, 6 and 8 fail apparently without generating any errors. In the original script, I used
osascriptto launch an Applescript that checked a few things and then told System Events to shut down the computer. When this failed to work in Yosemite, I switched to a simple
shutdown -h +1command right in the
tcshscript. This made step 8 work correctly, but did nothing for steps 4 and 6. Ideally, I would like to get back to the Applescript
shutdowncommand because it seems cleaner: Applications get a chance to close out or even cancel the shutdown if necessary.
One more point I should make is that I'm using
ssh -finto the root user on the two other computers to send the
shutdowncommands. I've set the computers up with my computer's RSA keys to enable a passwordless login, so the current command is just
ssh -f email@example.com 'shutdown -h +1'.
I have confirmed that it works to ssh to my wife's computer and shut it down manually. It is only the script that does not shutdown the other computer.
Has anyone any idea of why this is not working in Yosemite. More importantly, any ideas of how to make it work? I would like to be able to set the backup running and then head to bed knowing that the computers will shut down when the process is completed.
Thanks in advance.