2021-05-28 16:33:14 +12:00
|
|
|
[Unit]
|
|
|
|
Description=libreddit daemon
|
|
|
|
After=network.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
DynamicUser=yes
|
|
|
|
# Default Values
|
2023-04-06 16:36:37 +12:00
|
|
|
#Environment=ADDRESS=0.0.0.0
|
|
|
|
#Environment=PORT=8080
|
2021-05-28 16:33:14 +12:00
|
|
|
# Optional Override
|
|
|
|
EnvironmentFile=-/etc/libreddit.conf
|
|
|
|
ExecStart=/usr/bin/libreddit -a ${ADDRESS} -p ${PORT}
|
|
|
|
|
2022-05-21 13:48:32 +12:00
|
|
|
# Hardening
|
|
|
|
DeviceAllow=
|
|
|
|
LockPersonality=yes
|
|
|
|
MemoryDenyWriteExecute=yes
|
|
|
|
PrivateDevices=yes
|
|
|
|
ProcSubset=pid
|
|
|
|
ProtectClock=yes
|
|
|
|
ProtectControlGroups=yes
|
|
|
|
ProtectHome=yes
|
|
|
|
ProtectHostname=yes
|
|
|
|
ProtectKernelLogs=yes
|
|
|
|
ProtectKernelModules=yes
|
|
|
|
ProtectKernelTunables=yes
|
|
|
|
ProtectProc=invisible
|
|
|
|
RestrictAddressFamilies=AF_INET AF_INET6
|
|
|
|
RestrictNamespaces=yes
|
|
|
|
RestrictRealtime=yes
|
|
|
|
RestrictSUIDSGID=yes
|
|
|
|
SystemCallArchitectures=native
|
|
|
|
SystemCallFilter=@system-service ~@privileged ~@resources
|
|
|
|
UMask=0077
|
|
|
|
|
2021-05-28 16:33:14 +12:00
|
|
|
[Install]
|
|
|
|
WantedBy=default.target
|