[Unit] Description=IPCAM Recorder Service (FFmpeg supervisor) After=network.target postgresql.service # Deliberadamente NÃO depende de apache2/php-fpm. [Service] Type=simple User=www-data Group=www-data WorkingDirectory=/var/www/html/ipcam/apps/panel Environment=PATH=/usr/bin:/usr/local/bin ExecStart=/var/www/html/ipcam/services/recorder/run.sh Restart=always RestartSec=3 TimeoutStopSec=25 KillMode=mixed NoNewPrivileges=true LimitNOFILE=4096 TasksMax=256 Nice=5 [Install] WantedBy=multi-user.target