1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
[Unit]
Description=Low Memory Monitor
ConditionPathExists=/proc/pressure
After=sysinit.target
[Service]
ExecStart=@LIBEXECDIR@/low-memory-monitor
Restart=on-failure
#Uncomment this to enable debug
#Environment="G_MESSAGES_DEBUG=all"
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=1
# Filesystem lockdown
ProtectSystem=strict
PrivateDevices=true
ProtectControlGroups=true
ProtectHome=true
PrivateTmp=true
# Network
PrivateNetwork=true
RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_NETLINK
# Execute Mappings
MemoryDenyWriteExecute=true
# Modules
ProtectKernelModules=true
# Real-time
RestrictRealtime=true
# Privilege escalation
NoNewPrivileges=true
[Install]
WantedBy=basic.target
|