Skip to content

Instantly share code, notes, and snippets.

@Apocrathia
Last active October 14, 2018 16:54
Show Gist options
  • Save Apocrathia/05a160a67e351d101f20 to your computer and use it in GitHub Desktop.
Save Apocrathia/05a160a67e351d101f20 to your computer and use it in GitHub Desktop.
SickRage Update
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apocrathia.sickrage</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/Users/ianyoung/Sites/Sickrage/SickBeard.py</string>
<string>-q</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>UserName</key>
<string>ianyoung</string>
<key>WorkingDirectory</key>
<string>/Users/ianyoung/Sites/SickRage/</string>
<key>ServiceDescription</key>
<string>SickRage</string>
</dict>
</plist>
@daily $SBIN/update_sickrage >> $HOME/Sites/SickRage/git.log
#!/bin/bash
###########################
# SickRage Update Script #
###########################
date
cd $HOME/Sites/SickRage/;
echo "Stopping SickRage.";
/bin/launchctl stop com.apocrathia.sickrage;
/bin/launchctl unload $HOME/Library/LaunchAgents/com.apocrathia.sickrage.plist;
echo "Updating SickRage";
/usr/bin/git pull;
sleep 10;
echo "Starting SickRage.";
/bin/launchctl load $HOME/Library/LaunchAgents/com.apocrathia.sickrage.plist;
/bin/launchctl start com.apocrathia.sickrage;
sleep 10;
echo "Enjoy!";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment