-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbewitchd.service
More file actions
45 lines (42 loc) · 1.42 KB
/
Copy pathbewitchd.service
File metadata and controls
45 lines (42 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[Unit]
Description=Bewitch Server Monitor Daemon
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/bewitchd -config /etc/bewitch.toml
Restart=on-failure
RestartSec=5
User=bewitch
Group=bewitch
StateDirectory=bewitch
StateDirectoryMode=0700
RuntimeDirectory=bewitch
# 0755 (default): keep the unix socket reachable by all local users for the
# TUI/REPL. Tighten to 0750 + bewitch group to restrict who can connect.
RuntimeDirectoryMode=0755
UMask=0077
# --- Sandboxing -------------------------------------------------------------
# Confine all writes to the state dir. See debian/bewitch.bewitchd.service for the
# full rationale and the directives deliberately left unset (PrivateDevices,
# PrivatePID, SystemCallFilter, MemoryDenyWriteExecute) that would break SMART,
# eBPF, or the CGO DuckDB engine. This minimal unit omits the elevated
# capabilities; add the AmbientCapabilities / SupplementaryGroups from the Debian
# unit if you need SMART / GPU / per-process disk+network I/O.
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/bewitch
PrivateTmp=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
ProtectClock=true
ProtectHostname=true
RestrictSUIDSGID=true
RestrictRealtime=true
LockPersonality=true
RestrictNamespaces=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target