Created
June 3, 2014 04:56
-
-
Save jgillman/4d3975ab5aa10d6460a1 to your computer and use it in GitHub Desktop.
A quick and dirty shell script to turn on the Lightpack, launch Plex, then turn off the Lightpack when Plex exits.
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
#!/bin/bash | |
# A quick and dirty shell script to turn on the Lightpack, launch Plex, then | |
# turn off the Lightpack when Plex exits. | |
# Turn on Lightpack | |
(sleep 1; echo "lock"; echo "setstatus:on"; sleep 1; echo "exit") \ | |
| telnet 127.0.0.1 3636; | |
# Launch Plex Home Theater, and turn off Lightpack on exit | |
"/Applications/Plex Home Theater.app/Contents/MacOS/Plex Home Theater" \ | |
&& (sleep 1; echo "lock"; echo "setstatus:off"; sleep 1; echo "exit") \ | |
| telnet 127.0.0.1 3636 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment