From b704dc12bb22d5ca35eb474e70daf2108652750e Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Fri, 28 Jul 2017 13:33:39 -0600 Subject: [PATCH] Update FreeNAS instructions to use `sysrc plexpy_user` to set user instead of editing `/etc/rc.d/plexpy` --- Install-as-a-daemon.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Install-as-a-daemon.md b/Install-as-a-daemon.md index 99db789..79b7814 100644 --- a/Install-as-a-daemon.md +++ b/Install-as-a-daemon.md @@ -97,15 +97,18 @@ Optional: ## FreeNAS Instructions by [Supa on the FreeNAS forums](https://forums.freenas.org/index.php?threads/how-to-install-plexpy-in-a-freenas-9-3-jail.38589/#post-234202). -This assumes PlexPy is installed to `/usr/local/share/` as per installation instructions. +This assumes PlexPy is installed to `/usr/local/share/` as per installation instructions, and user is `root`. To automate the PlexPy script just do this in the jail shell (in root directory): * Make sure PlexPy is shutdown. `PlexPy > Settings > Shutdown` -* Type: `cp /usr/local/share/plexpy/init-scripts/init.freenas /etc/rc.d/plexpy` -* Type: `chmod 777 /etc/rc.d/plexpy` -* Type: `edit /etc/rc.d/plexpy` - * Edit the user in the following line: `${plexpy_user:="xxxx"}` (I just used 'root') - * Save and close the file -* Type: `sysrc plexpy_enable="YES"`. -* Start PlexPy using `service plexpy start`. - * You can use `service plexpy [start | stop | restart | status]` to start/stop/restart or check the status of the PlexPy service \ No newline at end of file +* Ensure user permissions are correct: `chown -R root:wheel /usr/local/share/plexpy` +* Copy init script: `cp /usr/local/share/plexpy/init-scripts/init.freenas /etc/rc.d/plexpy` +* Enable at boot: `sysrc plexpy_enable="YES"` +* Set user to run: `sysrc plexpy_user="root"` +* To start `service plexpy start` + * You can use `service plexpy [start | stop | restart | status]` to start/stop/restart or check the status of the PlexPy service + +Optional: +* If you need to change user: `sysrc plexpy_user="USERNAME"` + * Set user permissions for the plexpy directory: `chown -R USERNAME:GROUPNAME /usr/local/share/plexpy` +* Run from another directory: `sysrc plexpy_dir="DIRECTORY"` \ No newline at end of file