-
-
Notifications
You must be signed in to change notification settings - Fork 137
/
varken.systemd
53 lines (50 loc) · 1.92 KB
/
varken.systemd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 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.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 - Command-line utility to aggregate data from the Plex ecosystem into InfluxDB.
After=network-online.target
StartLimitInterval=200
StartLimitBurst=3
[Service]
Type=simple
User=varken
Group=varken
WorkingDirectory=/opt/Varken
ExecStart=/opt/Varken/varken-venv/bin/python /opt/Varken/Varken.py
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target