matrix.grapheneos.org/systemd/system/mjolnir.service
2025-02-27 09:02:08 -05:00

47 lines
1 KiB
Desktop File

[Unit]
Description=mjolnir bot
After=synapse.service
[Service]
CapabilityBoundingSet=
Environment=NODE_ENV=production
ExecStart=/usr/bin/node /opt/mjolnir/lib/index.js
IPAddressDeny=any
IPAddressAllow=localhost
IPAddressAllow=51.79.51.42
IPAddressAllow=2607:5300:205:200::26e1
LockPersonality=true
NoNewPrivileges=true
PrivateDevices=true
PrivateIPC=true
PrivateTmp=true
PrivateUsers=true
ProcSubset=pid
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectProc=invisible
ProtectSystem=strict
ReadWritePaths=/var/lib/mjolnir
RemoveIPC=true
Restart=always
RestartMaxDelaySec=10s
RestartSec=100ms
RestartSteps=5
RestrictAddressFamilies=AF_INET6
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=@system-service pkey_mprotect pkey_alloc pkey_free
SystemCallFilter=~@privileged @resources @obsolete
UMask=0077
User=mjolnir
WorkingDirectory=/var/lib/mjolnir
[Install]
WantedBy=multi-user.target