-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Init: Add systemd system unit. Contributes to #26
Signed-off-by: Björn Bidar <[email protected]>
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |