mirror of
https://github.com/GrapheneOS/matrix.grapheneos.org.git
synced 2025-07-26 08:05:39 -04:00
add mjolnir systemd unit
This commit is contained in:
parent
c7f189ba29
commit
3ff1fe54a9
1 changed files with 41 additions and 0 deletions
41
systemd/system/mjolnir.service
Normal file
41
systemd/system/mjolnir.service
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
[Unit]
|
||||||
|
Description=mjolnir bot
|
||||||
|
After=synapse.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
CapabilityBoundingSet=
|
||||||
|
ExecStart=/usr/bin/node /opt/mjolnir/lib/index.js
|
||||||
|
IPAddressDeny=any
|
||||||
|
IPAddressAllow=localhost
|
||||||
|
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
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5s
|
||||||
|
RestrictAddressFamilies=AF_INET 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
|
Loading…
Add table
Add a link
Reference in a new issue