Last active
October 14, 2018 16:54
-
-
Save Apocrathia/05a160a67e351d101f20 to your computer and use it in GitHub Desktop.
SickRage Update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@daily $SBIN/update_sickrage >> $HOME/Sites/SickRage/git.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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