Skip to content

Commit

Permalink
Init: Add systemd system unit. Contributes to progval#26
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Bidar <[email protected]>
  • Loading branch information
Thaodan committed Jul 11, 2022
1 parent cbbf089 commit 1ce2051
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions init/systemd/system/matrix2052.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[Unit]
Description=A Matrix gateway for IRC, join from your favorite IRC client
After=network.target
Wants=network.target

[Service]
Type=simple
User=matrix2051
Group=matrix2051
DynamicUser=true
SyslogIdentifier=matrix2051
StateDirectory=matrix2051
RuntimeDirectory=matrix2051
ExecStart=/usr/lib/matrix2051/bin/matrix2051 start
ExecStop=/usr/lib/matrix2051/bin/matrix2051 stop
Environment=HOME=/var/lib/matrix2051
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
Restart=always
RestartSec=10
CapabilityBoundingSet=
AmbientCapabilities=
NoNewPrivileges=true
#SecureBits=
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
PrivateNetwork=false
PrivateUsers=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=true
LockPersonality=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallFilter=@system-service
SystemCallArchitectures=native


[Install]
WantedBy=multi-user.target

0 comments on commit 1ce2051

Please sign in to comment.