Skip to content

Installing on Mac OS X

David Kaminsky edited this page Sep 1, 2016 · 1 revision

#Mac OS X

To configure PlexRequests to run on a Mac and set it to start up with the system, do the following (via terminal):

####Create a location to drop the files (up to you, we'll use /opt/PlexRequests as an example)

sudo mkdir /opt/PlexRequests

####Download the release zip

sudo wget {release zip file url}
sudo unzip PlexRequests.zip -d /opt/PlexRequests

####Install Mono (must be on v4.x or above for compatibility)

Download and install the Mono OSX (MRE) package from the mono-project website

####Check your Mono version

sudo mono --version

if you don't see v4.x or above, uninstall it, and check here for instructions: http://www.mono-project.com/docs/getting-started/install/mac/

####Verify Mono properly runs PlexRequests

sudo /usr/bin/mono /opt/PlexRequests/Release/PlexRequests.exe

####The following instructions will cover installation as a local user (which will start when the user logs in) and an admin user (which will start when the computer starts up)


Autostart on the Mac

As a local user

  1. Create a file called net.tidusjar.plexrequests.plist in your ~/Library/LaunchAgents directory with the following content:
<?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>
	<dict>
		<key>SuccessfulExit</key>
		<false/>
	</dict>
	<key>Label</key>
	<string>PlexRequests</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/bin/mono</string>
		<string>PlexRequests.exe</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>WorkingDirectory</key>
	<string>/opt/PlexRequests/Release</string>
</dict>
</plist>
  1. Open up Terminal and run which mono to get the absolute path of the mono executable. Make sure line 14 matches in the plist file

  2. Change line 20 to the absolute path of your PlexRequests folder

  3. Make sure your PlexRequests folder matches your user permissions (otherwise the launchd service might fail to start):

    sudo chown -R $(whoami) /opt/PlexRequests

  4. In Terminal:

    To enable the daemon: launchctl load ~/Library/LaunchAgents/net.tidusjar.plexrequests.plist

    To disable the daemon: launchctl unload ~/Library/LaunchAgents/net.tidusjar.plexrequests.plist

  5. Enjoy! This will automatically start PlexRequests when you login

As an admin user

  1. Create a file called net.tidusjar.plexrequests.plist in your /Library/LaunchAgents directory with the following content:
<?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>
	<dict>
		<key>SuccessfulExit</key>
		<false/>
	</dict>
	<key>Label</key>
	<string>PlexRequests</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/bin/mono</string>
		<string>PlexRequests.exe</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>WorkingDirectory</key>
	<string>/opt/PlexRequests/Release</string>
</dict>
</plist>
  1. Open up Terminal and run which mono to get the absolute path of the mono executable. Make sure line 14 matches in the plist file

  2. Change line 20 to the absolute path of your PlexRequests folder

  3. In Terminal:

    To enable the daemon: sudo launchctl load /Library/LaunchAgents/net.tidusjar.plexrequests.plist

    To disable the daemon: sudo launchctl unload /Library/LaunchAgents/net.tidusjar.plexrequests.plist

  4. Enjoy! This will automatically start PlexRequests your machine boots

Clone this wiki locally