[Unit] Description=Pulse Sensor Cleanup Service Documentation=https://github.com/rcourtman/Pulse After=network.target [Service] Type=oneshot ExecStart=/usr/local/bin/pulse-sensor-cleanup.sh User=root Group=root WorkingDirectory=/var/lib/pulse-sensor-proxy # Logging StandardOutput=journal StandardError=journal SyslogIdentifier=pulse-sensor-cleanup # Security hardening (less restrictive than the proxy since we need SSH access) NoNewPrivileges=true ProtectSystem=strict ReadWritePaths=/var/lib/pulse-sensor-proxy /root/.ssh ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true PrivateTmp=true RestrictSUIDSGID=true RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 LimitNOFILE=1024 [Install] # This service is triggered by the .path unit, no need to enable it directly