-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathserverino.example.service
More file actions
33 lines (25 loc) · 779 Bytes
/
serverino.example.service
File metadata and controls
33 lines (25 loc) · 779 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
28
29
30
31
32
33
# Edit this file, rename and copy it inside /etc/systemd/system
# Then
# sudo systemctl enable your-renamed-service
# sudo systemctl start your-renamed-service
[Unit]
Description=Serverino Example App
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service
# Max 10 restarts in 600 seconds
#StartLimitBurst=10
#StartLimitIntervalSec=600
[Service]
User=ubuntu
Group=ubuntu
Restart=always
RestartSec=3s
# If you want to restart service every 12h (=43200 seconds)
#RuntimeMaxSec=43200
WorkingDirectory=/path/to/your/project/
# You can run the compiled executable
ExecStart=/path/to/your/project/executable
# Or if user/group settings are ok, you can test also:
#ExecStart=dub --build=release-nobounds
[Install]
WantedBy=multi-user.target