diff --git a/varken.service b/varken.service deleted file mode 100644 index 5e9bfec..0000000 --- a/varken.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Varken - A data collection and graphing tool -After=network-online.target - -[Service] -Type=simple -User=username -WorkingDirectory=/opt/Varken -ExecStart=/opt/Varken/varken-venv/bin/python /opt/Varken/varken.py -Restart=always - -[Install] -WantedBy=multi-user.target diff --git a/varken.systemd b/varken.systemd new file mode 100644 index 0000000..a082ebb --- /dev/null +++ b/varken.systemd @@ -0,0 +1,48 @@ +# Varken - Command-line utility to aggregate data from the Plex ecosystem into InfluxDB. +# +# Service Unit file for systemd system manager +# +# INSTALLATION NOTES +# +# 1. Copy this file into your systemd service unit directory (often '/lib/systemd/system') +# and name it 'varken.service' with the following command: +# cp /opt/Varken/Varken/varken.systemd /lib/systemd/system/varken.service +# +# 2. Edit the new varken.service file with configuration settings as required. +# More details in the "CONFIGURATION NOTES" section shown below. +# +# 3. Enable boot-time autostart with the following commands: +# systemctl daemon-reload +# systemctl enable varken.service +# +# 4. Start now with the following command: +# systemctl start varken.service +# +# CONFIGURATION NOTES +# +# - The example settings in this file assume that you will run varken as user: varken +# - The example settings in this file assume that varken is installed to: /opt/Varken +# +# - To create this user and give it ownership of the Varken directory: +# Ubuntu/Debian: sudo addgroup varken && sudo adduser --system --no-create-home varken --ingroup varken +# CentOS/Fedora: sudo adduser --system --no-create-home varken +# sudo chown varken:varken -R /opt/Varken +# +# - Adjust User= and Group= to the user/group you want Varken to run as. +# +# - WantedBy= specifies which target (i.e. runlevel) to start Varken for. +# multi-user.target equates to runlevel 3 (multi-user text mode) +# graphical.target equates to runlevel 5 (multi-user X11 graphical mode) + +[Unit] +Description=Varken - A data collection and graphing tool +After=network-online.target + +[Service] +Type=simple +User=username +WorkingDirectory=/opt/Varken +ExecStart=/opt/Varken/varken-venv/bin/python /opt/Varken/varken.py + +[Install] +WantedBy=multi-user.target