Created
April 16, 2014 14:54
-
-
Save anonymous/10889103 to your computer and use it in GitHub Desktop.
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 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.tv.nzbget</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/bin/nzbget</string> | |
| <string>-D</string> | |
| <string>-c</string> | |
| <string>/Users/Chancho/.nzbget.conf</string> | |
| </array> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| </dict> | |
| </plist> |
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 characters
| #!/usr/bin/env ruby | |
| `whoami >> /Users/Chancho/test-push.txt` | |
| `ruby -v >> /Users/Chancho/test-push.txt` | |
| ############################################################################## | |
| ### NZBGET POST-PROCESSING SCRIPT ### | |
| # Send pushbullet notification. | |
| # | |
| # This script sends a pushbullet notification when the job is finished. | |
| # | |
| # NOTE: This script requires ruby to be installed on your system. | |
| ### OPTIONS | |
| # Pushbullet API key | |
| #Api= | |
| # NOTE: email address of recipient, recipient must add you as a friend | |
| #Email= | |
| ### NZBGET POST-PROCESSING SCRIPT ### | |
| ############################################################################## | |
| require 'pushbullet' | |
| client = Pushbullet::Client.new("#{ENV['NZBPO_API']}") | |
| message = <<EOF | |
| Category: #{ENV['NZBPP_CATEGORY']} | |
| --------------------------------- | |
| #{ENV['NZBPP_NZBNAME']} | |
| --------------------------------- | |
| Status | |
| Repair:#{ENV['NZBPP_PARSTATUS'] != 1 ? 'Good' : 'Failed'} \ | |
| Unpack:#{ENV['NZBPP_UNPACKSTATUS'] != 1 ? 'Good' : 'Failed'} | |
| EOF | |
| client.push_note_to("#{ENV['NZBPO_EMAIL']}", 'Download Finished', "#{message}") | |
| exit 93 |
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 characters
| # when Nzbget is start by a launchagent | |
| Chancho | |
| ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] | |
| # when Nzbget is started from a terminal | |
| Chancho | |
| ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment