Merge pull request #29 from webp-sh/systemd_fix

systemd service file update, close #27
This commit is contained in:
Nova Kwok 2020-03-13 10:31:46 +08:00 committed by GitHub
commit 119925e7f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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