systemd units allow to run processes in foreground while daemonization is done on systemd service level when using Type=simple (default). This allows systemd to reliably track the service state, signals and could catch outputs, i.e. it is possible to remove "--quiet" to have Tautulli logging to systemd journal (journalctl) additionally or alternatively to log files.
In case of Type=forking, a PID file is required to allow system reliably determine the service state, which would be an alternative, but has no real advantage. The solution with "GuessMainPID=no" allows systemd to correctly determine the service active state, but e.g. when it is killed, it is seen as "Succeeded." since systemd cannot track the exit code or signal.
Skip the extra process calls trying to figure out what to run Tautulli
with, as well as give an example on how to change the executable in the
init script.
Remove several init scripts for operating systems that are no longer
supported:
* `init.ubuntu` would only be useful on Ubuntu 14.04 LTS which has been
in ESM for over a year
* `init.solaris` is for an operating system that hasn't been updated in
>10 years
* `init.upstart` is for a startup method Ubuntu attempted but abandoned
* `init.fedora.centos.service` is for a version that hasn't recieved
updates since 2017-05-10
* `init.freenas` is identical to `init.freebsd`
* `init-alt.freebsd` appears to attempt to use the web interface
directly, and would break with authentication enabled
Now that the Tautulli will run on both major versions of Python we can
remove the specificity in the init scripts and make them simpler, with
the added advantage that some OS's will now run Tautulli through Python
3 instead of Python 2.
Edited user creation and directory ownership instructions in the configuration notes for clarity. Current version may give novice users the impression that the ownership command is only executed on CentOS/Fedora.
If the process fails 3 times within 90 seconds of a start attempt
consider it permanently failed and stop all further attempts to restart
it automatically.
If Tautulli ever crashes due to a failure of some sort the policies
mentioned here will automatically restart it, with the caveat that they
will _always_ restart it, even if it is going to crash right away again!
Updated the instructions to more accurately reflect required steps. Removed outdated information and added information on creating the plexpy user.
Only the comments of the file changed not actual configuration.
Init file for CentOS 6.X systems, variables exist for different install directorys. Please note, current version of Python is 2.6 and PlexPy requires 2.7. A variable exists to point to this path.
Since PlexPy is based on Headphones, I just copied the init script for Headphones and changed the paths and added the Python2.7 path