Files
revpipyload/data/lib/systemd/revpipyload.service
Sven Sager b12a52623b feat: Use systemd sandboxing for daemon process
The server process is limited to certain locations via the sandboxing of
systemd. These restrictions also apply to the control programs and
their specified users.
2024-09-12 15:59:43 +02:00

26 lines
720 B
Desktop File

[Unit]
Description=Python PLC services for Revolution Pi
After=network.target
[Service]
EnvironmentFile=-/etc/default/revpipyload
Type=forking
PIDFile=/var/run/revpipyload.pid
ExecStart=/usr/share/revpipyload/revpipyloadd -d $DAEMON_OPTS
ExecReload=/bin/kill -HUP $MAINPID
# systemd sandboxing process
ProtectSystem=strict
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
# Allow write operations to the following destinations
ReadWritePaths=/dev/piControl0 /etc/revpipyload/ /etc/revpi/config.rsc /home/ /var/lib/revpipyload/ /var/log/ /var/run/revpipyload.pid
# Restrict file system access to the following directories
InaccessiblePaths=/boot /root
[Install]
WantedBy=multi-user.target