Add systemd unit file webps.service (#3)

* Add systemd unit file webps.service

* Update webps.service
This commit is contained in:
muzi 2020-02-26 19:25:19 +08:00 committed by GitHub
parent 95b4443c13
commit 3380f63af5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

18
webps.service Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=WebP Server
Documentation=https://github.com/n0vad3v/webp_server_go
After=nginx.target
[Service]
Type=simple
StandardError=journal
AmbientCapabilities=CAP_NET_BIND_SERVICE
WorkingDirectory=/opt/webps
ExecStart=/opt/webps/webp-server --config /opt/webps/config.json
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target