From c8feff0d7a9414113427ab4bb9624895b4221eea Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Sun, 25 Aug 2024 12:29:25 +0200 Subject: [PATCH] feat: add systemd unit --- pkg/hayai.service | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pkg/hayai.service diff --git a/pkg/hayai.service b/pkg/hayai.service new file mode 100644 index 0000000..35f70f4 --- /dev/null +++ b/pkg/hayai.service @@ -0,0 +1,23 @@ +[Unit] +Description=An EEW system for Linux +After=network.target +StartLimitIntervalSec=60 +StartLimitBurst=4 + +[Service] +User=%i +ExecStart=/usr/bin/hayai +Restart=on-failure +RestartSec=1 +SuccessExitStatus=3 4 +RestartForceExitStatus=3 4 + +# Hardening +ProtectSystem=full +PrivateTmp=true +SystemCallArchitectures=native +MemoryDenyWriteExecute=true +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target \ No newline at end of file