-
Notifications
You must be signed in to change notification settings - Fork 285
Expand file tree
/
Copy pathinit.systemd
More file actions
executable file
·61 lines (52 loc) · 2.06 KB
/
Copy pathinit.systemd
File metadata and controls
executable file
·61 lines (52 loc) · 2.06 KB
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
54
55
56
57
58
59
60
61
# Medusa systemd service unit file
#
# Configuration Notes
#
# - Option names (e.g. ExecStart=, Type=) are case-sensitive)
#
# - Adjust User= and Group= to the user/group you want Medusa to run as.
#
# - Optional adjust EnvironmentFile= path to configuration file
# Can ONLY be used for configuring extra options used in ExecStart.
# Putting a minus (-) in front of file means no error warning if the file doesn't exist
#
# - Adjust ExecStart= to point to your python and Medusa executables.
# The FIRST token of the command line must be an ABSOLUTE FILE NAME,
# then followed by arguments for the process.
# If no --datadir is given, data is stored in same dir as start.py
# Arguments can also be set in EnvironmentFile (except python)
#
# - WantedBy= specifies which target (i.e. runlevel) to start Medusa for.
# multi-user.target equates to runlevel 3 (multi-user text mode)
# graphical.target equates to runlevel 5 (multi-user X11 graphical mode)
#
### Example Using Medusa as daemon with pid file
# Type=forking
# PIDFile=/var/run/PyMedusa/Medusa.pid
# ExecStart=/usr/bin/python3 /opt/medusa/start.py -q --daemon --nolaunch --pidfile=/var/run/PyMedusa/Medusa.pid --datadir=/opt/medusa
## Example Using Medusa as daemon without pid file
# Type=forking
# GuessMainPID=no
# ExecStart=/usr/bin/python3 /opt/medusa/start.py -q --daemon --nolaunch --datadir=/opt/medusa
### Example Using simple
# Type=simple
# ExecStart=/usr/bin/python3 /opt/medusa/start.py -q --nolaunch
### Example Using simple with EnvironmentFile where APP_DATA=/home/medusa/.medusa in /etc/medusa.conf
# Type=simple
# EnvironmentFile=/etc/medusa.conf
# ExecStart=/usr/bin/python3 /opt/medusa/start.py -q --nolaunch --datadir=${APP_DATA}
### Configuration
[Unit]
Description=Medusa Daemon
After=network.target
[Service]
User=medusa
Group=medusa
ReadWritePaths=/opt/medusa
Type=simple
ExecStart=/usr/bin/python3 /opt/medusa/start.py -q --nolaunch --datadir=/opt/medusa
TimeoutStopSec=25
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target