diff --git a/systemd-service/recorder.service b/systemd-service/recorder.service new file mode 100644 index 0000000..83c44c0 --- /dev/null +++ b/systemd-service/recorder.service @@ -0,0 +1,45 @@ +[Unit] +Description=Livewire Audio Recorder (Hourly WAV, integrated folderkeeper) +Documentation=man:ffmpeg(1) +After=network-online.target time-sync.target local-fs.target +Wants=network-online.target time-sync.target +RequiresMountsFor=/loggerdata + +[Service] +Type=simple +#Important we work in UTC +Environment=TZ=UTC + +#User=logger +#Group=logger + +ExecStart=/usr/local/bin/recorder.sh + +# Restart-Strategy +Restart=always +RestartSec=5 +StartLimitIntervalSec=60 +StartLimitBurst=3 + +# Ressources +CPUQuota=25% +MemoryMax=1G +TasksMax=50 + +# Sandboxing +NoNewPrivileges=true +PrivateTmp=true +ProtectSystem=full +ProtectHome=true +ReadWritePaths=/loggerdata + +# Safe Stops +KillSignal=SIGINT +TimeoutStopSec=30 + +# Logging +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target \ No newline at end of file