From 24c243cbd422498f831e13ae153839307e53c523 Mon Sep 17 00:00:00 2001 From: "Yulin.Sun" Date: Tue, 29 Aug 2023 09:19:46 -0700 Subject: [PATCH] quark: add kuasar-quark systemd service --- Makefile | 2 ++ quark/service/kuasar-quark.service | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 quark/service/kuasar-quark.service diff --git a/Makefile b/Makefile index f4986d6b..ffb78e64 100644 --- a/Makefile +++ b/Makefile @@ -81,5 +81,7 @@ install-wasm: install-quark: @install -p -m 550 bin/quark-sandboxer ${DEST_DIR}${BIN_DIR}/quark-sandboxer + @install -d -m 750 ${DEST_DIR}${SYSTEMD_SERVICE_DIR} + @install -p -m 640 quark/service/kuasar-quark.service ${DEST_DIR}${SYSTEMD_SERVICE_DIR}/kuasar-quark.service install: all install-vmm install-wasm install-quark diff --git a/quark/service/kuasar-quark.service b/quark/service/kuasar-quark.service new file mode 100644 index 00000000..430ca169 --- /dev/null +++ b/quark/service/kuasar-quark.service @@ -0,0 +1,16 @@ +[Unit] +Description=Kuasar Quark sandboxer daemon process +After=network.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/quark-sandboxer --listen /run/quark-sandboxer.sock --dir /var/lib/kuasar-quark +ExecReload=/bin/kill -s HUP $MAINPID +LimitNOFILE=1048576 +LimitNPROC=infinity +LimitCORE=infinity +Delegate=yes +KillMode=process + +[Install] +WantedBy=multi-user.target \ No newline at end of file