Browse Source

Update README.md

Python meta-package handles the symlinks python to python2 to python2.7 in /usr/local/bin where user-installed software goes. Unfortunately that isn't in startup's $PATH for root, so the startup script fails. Symlinking python into the base system isn't great and will get blown away on system update, but appears to be the "best" worst way to make the startup script work for root out of the following options:

1) changing shebang in CouchPotato.py is a little brazen
2) append $PATH in the startup script, apparently bad form
3) specify /usr/local/bin/python as $command... also apparently bad form

If using non-root user, /usr/local/bin is in $PATH. I'm hoping that by mentioning "running as root" a few times, the instructions are clear enough for people who understand permissions, yet simple enough for people who don't care or are in a jail().

Note that per rc.subr(8) and a quick test, $command_interpreter isn't actually used to execute $command, just to find the process.

References:
https://github.com/RuudBurger/CouchPotatoServer/pull/1226
https://www.freebsd.org/cgi/man.cgi?query=rc.subr&sektion=8
https://forums.freebsd.org/threads/rc_run_command-and-command_interpreter.27786/

Tested on FreeBSD 10.1-RELEASE amd64 as root, non-root with appropriate permissions, service start/status/stop, shutdown, reboot.
pull/5075/head
Grogdor 10 years ago
parent
commit
2548d04495
  1. 1
      README.md

1
README.md

@ -55,6 +55,7 @@ FreeBSD:
* Update your repo catalog `pkg update`
* Install required tools `pkg install python py27-sqlite3 fpc-libcurl docbook-xml git-lite`
* For default install location and running as root `cd /usr/local`
* If running as root, expects python here `ln -s /usr/local/bin/python /usr/bin/python`
* Run `git clone https://github.com/RuudBurger/CouchPotatoServer.git`
* Copy the startup script `cp CouchPotatoServer/init/freebsd /usr/local/etc/rc.d/couchpotato`
* Make startup script executable `chmod 555 /usr/local/etc/rc.d/couchpotato`

Loading…
Cancel
Save