I mainly had an issue with autocapitalize because CP seems to check the username in a case sensitive way.
But adding all of these seems like the safest option.
CouchPotato doesn't need to run before LOGIN and this is mandatory for non-root user anyway, see #4 under 6.26.1. Pre-Commit Checklist at https://www.freebsd.org/doc/en/books/porters-handbook/rc-scripts.html
Tested on FreeBSD 10.1-RELEASE amd64 as root, non-root with appropriate permissions, service start/status/stop, shutdown, reboot.
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/1226https://www.freebsd.org/cgi/man.cgi?query=rc.subr&sektion=8https://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.
Tested on a fresh installation of FreeBSD 10.1-RELEASE amd64. There's no sudo or vim. All required software uses default build options (asynchronous DNS via c-ares in curl is off by default) so using packages is easier/faster. Removed "run first time manually" as it can cause permission/location issues, replaced with some configuration information. User startup scripts go into /usr/local/etc/rc.d and should not be edited to specify options.