-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathred@.service
More file actions
27 lines (21 loc) · 736 Bytes
/
red@.service
File metadata and controls
27 lines (21 loc) · 736 Bytes
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
[Unit]
Description=Red-DiscordBot %i
After=multi-user.target
[Service]
Type=idle
User=red
Group=red
WorkingDirectory=/srv/red/%i/
ExecStart=/usr/bin/python3.5 /srv/red/%i/red.py --no-prompt
# If set to "on-failure" Red will only restart when it crashed or froze, but not when [p]shutdown is used. (froze untested)
# If set to "always" Red will always attempt to restart regardless of how it was turned off.
Restart=always
# Limit waiting for Red to stop to 30 seconds to prevent terminal from freezing up.
TimeoutStopSec="30"
# Send SIGINT for graceful stop
KillSignal=SIGINT
KillMode=mixed
# Discord hearbeat is about every 40 seconds. Using 90 to be safe from false restarts.
WatchdogSec=90
[Install]
WantedBy=multi-user.target