launchd WatchPaths vs RuntimeRevolution CGI
March 14, 2008 1:02 PM Subscribe
Can a launchd plist set to WatchPaths respond to a CGI script updating a file?
posted by evil holiday magic to Computers & Internet (4 answers total)
I have a shell script in ~/ that runs rsync between a local folder and a remote server directory. The .ssh/authenticated_keys file has been updated, so this whole process works smoothly without any user interaction.
I wanted this script to run automatically, so I set up a plist for launchd to watch the local folder, and respond to changes by running the rsync script. So, whenever a file is moved in or out of the local folder, or a file is updated by the user, rsync is launched, and the remote server is updated to reflect the changes. This also works fine.
Here's where it all goes awry:
The actual files that I want launchd to watch for updates will be updated by a CGI script. The script has been working fine for years, and the Finder reflects the new modification date when a file is changed by the script. However, launchd doesn't seem to notice the file being modified by the script.
I've tried moving the plist among the various Agent and Daemon folders (loading it with Lingon or the launchctl command), with no luck.
Intel Mac Mini 2.0
Mac OS X 10.4.10