summarylogtreecommitdiffstats
path: root/cellframe-node.service
diff options
context:
space:
mode:
authorMika Hyttinen2024-01-06 12:53:58 +0200
committerMika Hyttinen2024-01-06 12:53:58 +0200
commitb1a87a9e69fb98a4d5b563fea79a7c6f06933f45 (patch)
tree8c70110b810357729983f2ea429375d6e9963ad7 /cellframe-node.service
parent608025c61a4bede1ff4834181a94ca259405bce3 (diff)
downloadaur-b1a87a9e69fb98a4d5b563fea79a7c6f06933f45.tar.gz
Add new files for more aggressive log rotation (enable with systemctl enable --now cellframe-node-logrotate.timer). Modify cellframe-node service to disable stdout to journal.
Diffstat (limited to 'cellframe-node.service')
-rw-r--r--cellframe-node.service20
1 files changed, 20 insertions, 0 deletions
diff --git a/cellframe-node.service b/cellframe-node.service
new file mode 100644
index 000000000000..74f03648ed9f
--- /dev/null
+++ b/cellframe-node.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Cellframe Node
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+WorkingDirectory=/opt/cellframe-node
+ExecStart=/opt/cellframe-node/bin/cellframe-node &
+ExecStop=/bin/kill -SIGTERM $MAINPID
+Restart=always
+User=root
+Group=root
+RestartSec=10
+LogNamespace=cellframe
+StandardOutput=null
+StandardError=journal
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_IPC_LOCK CAP_KILL CAP_LEASE CAP_MKNOD CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_RAWIO CAP_SYSLOG CAP_WAKE_ALARM CAP_SYS_RESOURCE CAP_DAC_READ_SEARCH
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file