26 lines
585 B
Desktop File
26 lines
585 B
Desktop File
# This is a sample service file for drinks manager
|
|
|
|
[Unit]
|
|
After=network.target network-online.target
|
|
Requires=network-online.target
|
|
Description=Drinks Manager
|
|
|
|
[Service]
|
|
User=drinks
|
|
Group=drinks
|
|
WorkingDirectory=/srv/drinks-manager/
|
|
# start the server:
|
|
ExecStart=/usr/bin/bash -c "/srv/drinks-manager/start.sh"
|
|
# stop the process with a SIGINT:
|
|
ExecStop=/usr/bin/bash -c "/bin/kill -2 $MAINPID;"
|
|
Restart=on-failure
|
|
TimeoutStopSec=15s
|
|
LimitNPROC=512
|
|
LimitNOFILE=1048576
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
PrivateTmp=true
|
|
ProtectSystem=full
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|