From 3380f63af509f5b9975d834f520b0b0968827fc0 Mon Sep 17 00:00:00 2001 From: muzi <42566386+muzi502@users.noreply.github.com> Date: Wed, 26 Feb 2020 19:25:19 +0800 Subject: [PATCH] Add systemd unit file webps.service (#3) * Add systemd unit file webps.service * Update webps.service --- webps.service | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 webps.service diff --git a/webps.service b/webps.service new file mode 100644 index 0000000..4437d96 --- /dev/null +++ b/webps.service @@ -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