-
Notifications
You must be signed in to change notification settings - Fork 0
/
gday_server.service
55 lines (43 loc) · 1.39 KB
/
gday_server.service
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
# systemd service that runs a gday_server
#
# Put your gday_server executable in ~/gday_server/gday_server.
#
# Save this file as:
# '/etc/systemd/system/gday_server.service'
#
# Reload the dameon:
# 'sudo systemctl daemon-reload'
#
# Enable the service so that it starts on boot:
# 'sudo systemctl enable gday_server'
#
# Start the service right now:
# 'sudo systemctl start gday_server'
#
# Verify the status of the service:
# 'sudo systemctl status gday_server'
#
# View service logs (-u specifies service, -f follows log in real time)
# 'sudo journalctl -u gday_server -f'
#
# View stderr and stdout log files in real time:
# 'tail -f ~/gday_server/stdout.log'
[Unit]
# Service description
Description=gday_server
# Start this service after network is ready
After=network.target
[Service]
# Command to execute (modify as needed)
ExecStart=/home/ubuntu/gday_server/gday_server --key /etc/letsencrypt/live/gday.manforowicz.com/privkey.pem --certificate /etc/letsencrypt/live/gday.manforowicz.com/fullchain.pem
# Auto-restart the service if it crashes
Restart=always
# How long to wait between restarts
RestartSec=20
# Run the service as root, so it can access the certificates
User=root
# Pipe stdout and stderr into custom log files (modify as needed)
StandardOutput=append:/home/ubuntu/gday_server/stdout.log
StandardError=append:/home/ubuntu/gday_server/stderr.log
[Install]
WantedBy=multi-user.target