launchd

Unison OS X launchd plist

unison_sync.sh

#!/bin/bash
pref=my_unison_pref
pid=`pgrep unison`

[ -z $pid ] && $HOME/bin/unison $pref -auto -batch

unison_sync.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>unison_sync</string>
    <key>ProgramArguments</key>
    <array>

Tags: 

Subscribe to launchd