From 9e2b1d9746c7e7e964188972966ba02723b9bed3 Mon Sep 17 00:00:00 2001 From: Florian Zumpe Date: Sat, 26 Sep 2026 20:40:42 +0200 Subject: [PATCH] Add userspace systemd unit --- systemd/wegwichtel.service | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 systemd/wegwichtel.service diff --git a/systemd/wegwichtel.service b/systemd/wegwichtel.service new file mode 100644 index 0000000..4aa9f32 --- /dev/null +++ b/systemd/wegwichtel.service @@ -0,0 +1,25 @@ +[Unit] +Description=Wegwichtel +After=network.target + +[Service] +Type=simple + +WorkingDirectory=%h/Wegwichtel +EnvironmentFile=%h/Wegwichtel/.env + +ExecStartPre=/usr/bin/npm ci +ExecStartPre=/usr/bin/npm run test:runtime-db +ExecStart=/usr/bin/env node %h/Wegwichtel/server.js + +Restart=on-failure +RestartSec=5 + +NoNewPrivileges=true +PrivateTmp=true +ProtectSystem=full + +ReadWritePaths=%h/Wegwichtel + +[Install] +WantedBy=default.target