From 555dda7b465134a7fb1917cfffba8a666dae0ccf Mon Sep 17 00:00:00 2001 From: Zhang Hua Date: Fri, 10 May 2024 20:13:29 +0800 Subject: [PATCH] Add systemd unit --- e5renewer.service | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 e5renewer.service diff --git a/e5renewer.service b/e5renewer.service new file mode 100644 index 0000000..b2f7d79 --- /dev/null +++ b/e5renewer.service @@ -0,0 +1,28 @@ +[Unit] +Description=E5 Renewer Daemon +Wants=network-online.target +After=network-online.target + +[Service] +ExecStart=E5Renewer -c /etc/e5renewer/config.json + +User=e5renewer +DynamicUser=yes + +NoNewPrivileges=yes + +ProtectSystem=strict +ProtectHome=yes +RuntimeDirectory=e5renewer +ConfigurationDirectory=e5renewer +PrivateDevices=yes +PrivateNetwork=yes +PrivateUsers=yes +ProtectKernelTunables=yes +ProtectKernelModules=yes +ProtectControlGroups=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +LockPersonality=yes + +[Install] +WantedBy=multi-user.target