systemd service file update, close #27

* remove capabilities: older kernel doesn't support
* remove reload: we don't support.
This commit is contained in:
Benny~ 2020-03-12 19:33:13 +08:00
parent 4288d19abc
commit ca8aacd73d
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481
2 changed files with 1 additions and 6 deletions

View File

@ -6,13 +6,10 @@ After=nginx.target
[Service] [Service]
Type=simple Type=simple
StandardError=journal StandardError=journal
AmbientCapabilities=CAP_NET_BIND_SERVICE
WorkingDirectory=/opt/webps WorkingDirectory=/opt/webps
ExecStart=/opt/webps/webp-server --config /opt/webps/config.json ExecStart=/opt/webps/webp-server --config /opt/webps/config.json
ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
RestartSec=3s RestartSec=3s
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -41,17 +41,15 @@ const sampleConfig = `
}` }`
const sampleSystemd = ` const sampleSystemd = `
[Unit] [Unit]
Description=WebP Server Description=WebP Server Go
Documentation=https://github.com/webp-sh/webp_server_go Documentation=https://github.com/webp-sh/webp_server_go
After=nginx.target After=nginx.target
[Service] [Service]
Type=simple Type=simple
StandardError=journal StandardError=journal
AmbientCapabilities=CAP_NET_BIND_SERVICE
WorkingDirectory=/opt/webps WorkingDirectory=/opt/webps
ExecStart=/opt/webps/webp-server --config /opt/webps/config.json ExecStart=/opt/webps/webp-server --config /opt/webps/config.json
ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
RestartSec=3s RestartSec=3s