Created
November 24, 2012 15:45
-
-
Save admsyn/4140204 to your computer and use it in GitHub Desktop.
Revisions
-
Adam Carlucci revised this gist
Nov 24, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,18 @@ Add this .plist to ~/Library/LaunchAgents to have it automatically take effect whenever you log in. It will continue to be active until you log out (even if you delete the file). You can take manual control over it instead by putting the file anywhere else, then using launchctl like this: - - - - - - - - - - - - - - - - - - - - - - - - - - - - launchctl load path/to/the/plist/com.admsyn.keep-twitter-alive.plist - - - - - - - - - - - - - - - - - - - - - - - - - - - - and - - - - - - - - - - - - - - - - - - - - - - - - - - - - launchctl unload path/to/the/plist/com.admsyn.keep-twitter-alive.plist - - - - - - - - - - - - - - - - - - - - - - - - - - - - Some notes : -
Adam Carlucci revised this gist
Nov 24, 2012 . 1 changed file with 17 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,29 @@ Add this .plist to ~/Library/LaunchAgents to have it automatically take effect whenever you log in. It will continue to be active until you log out (even if you delete the file). You can take manual control over it instead by putting the file anywhere else, then using launchctl like this: - - - - - - - - - - - - - - - - - - - - - - - - - - - - launchctl load com.admsyn.keep-twitter-alive.plist - - - - - - - - - - - - - - - - - - - - - - - - - - - - and - - - - - - - - - - - - - - - - - - - - - - - - - - - - launchctl unload com.admsyn.keep-twitter-alive.plist - - - - - - - - - - - - - - - - - - - - - - - - - - - - Some notes : - It will keep itself from rebooting the app repeatedly over a short period of time (e.g. if it crashes it will reboot instantly, if it crashes again right away it'll wait ~10 secs before trying again). I believe this is adjustable with another param in the plist. - launchd "owns" the app it spawns this way, so if you open the app yourself, then load the .plist, you'll get two copies of the app running. - Make sure the "Program" arg in the .plist points to the actual executable (e.g. in Contents/MacOS) instead of just the .app -
Adam Carlucci created this gist
Nov 24, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ Add this .plist to ~/Library/LaunchAgents to have it automatically take effect whenever you log in. It will continue to be active until you log out (even if you delete the file). You can take manual control over it instead by putting the file anywhere else, then using launchctl like this: launchctl load com.admsyn.keep-twitter-alive.plist and launchctl unload com.admsyn.keep-twitter-alive.plist Some notes : - It will keep itself from rebooting the app repeatedly over a short period of time (e.g. if it crashes it will reboot instantly, if it crashes again right away it'll wait ~10 secs before trying again). I believe this is adjustable with another param in the plist. - launchd "owns" the app it spawns this way, so if you open the app yourself, then load the .plist, you'll get two copies of the app running. - Make sure the "Program" arg in the .plist points to the actual executable (e.g. in Contents/MacOS) instead of just the .app This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ <?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>KeepAlive</key> <true/> <key>Label</key> <string>com.admsyn.keep-twitter-alive</string> <key>Program</key> <string>/Applications/Twitter.app/Contents/MacOS/Twitter</string> </dict> </plist>