summarylogtreecommitdiffstats
path: root/chinachu-wui.service
diff options
context:
space:
mode:
Diffstat (limited to 'chinachu-wui.service')
-rw-r--r--chinachu-wui.service16
1 files changed, 16 insertions, 0 deletions
diff --git a/chinachu-wui.service b/chinachu-wui.service
new file mode 100644
index 000000000000..9db687a25dd1
--- /dev/null
+++ b/chinachu-wui.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Chinachu WebUI Server Service
+After=network.target
+
+[Service]
+User=chinachu
+PermissionsStartOnly=true
+
+ExecStart=/var/lib/chinachu/chinachu service wui execute
+ExecStartPost=-/bin/bash -c "echo $MAINPID > /var/run/chinachu-wui.pid"
+
+ExecStop=/bin/kill -QUIT $MAINPID
+ExecStopPost=/usr/bin/rm -f -- /var/run/chinachu-wui.pid
+
+[Install]
+WantedBy=multi-user.target