[Unit]
Description=WHP Backup Upload Worker
After=network.target mysql.service
Wants=mysql.service

[Service]
Type=simple
User=root
ExecStart=/usr/bin/php /docker/whp/web/scripts/backup-upload-worker.php --daemon
Restart=on-failure
RestartSec=30
Environment=HOME=/root

# Logging
StandardOutput=append:/var/log/whp-backup.log
StandardError=append:/var/log/whp-backup.log

# Graceful shutdown - allow current upload to finish
TimeoutStopSec=600
KillSignal=SIGTERM

[Install]
WantedBy=multi-user.target
