48 lines
1.2 KiB
Desktop File
48 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=Ford Asset Pack SFTP Transfer Daemon
|
|
Documentation=file:///home/box-cli/FORD_SCRIPTS/ford-gechub-sftp/DAEMON_MODE.md
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# Run as root (User/Group commented out = runs as root by default)
|
|
# User=box-cli
|
|
# Group=box-cli
|
|
WorkingDirectory=/home/box-cli/FORD_SCRIPTS/ford-gechub-sftp
|
|
|
|
# Path to Python virtual environment
|
|
ExecStart=/home/box-cli/FORD_SCRIPTS/ford-gechub-sftp/venv/bin/python \
|
|
/home/box-cli/FORD_SCRIPTS/ford-gechub-sftp/ford_asset_pack_sftp.py --daemon
|
|
|
|
# Restart policy
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
# Stop gracefully with SIGTERM, escalate to SIGKILL after timeout
|
|
KillMode=mixed
|
|
KillSignal=SIGTERM
|
|
TimeoutStopSec=60
|
|
|
|
# Resource limits (optional - adjust as needed)
|
|
# MemoryLimit=512M
|
|
# CPUQuota=50%
|
|
|
|
# Security hardening (optional - uncomment if desired)
|
|
# PrivateTmp=yes
|
|
# NoNewPrivileges=yes
|
|
# ProtectSystem=strict
|
|
# ProtectHome=yes
|
|
# ReadWritePaths=/home/box-cli/FORD_SCRIPTS/ford-gechub-sftp
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=ford-asset-pack-sftp
|
|
|
|
# Environment
|
|
# Note: Sensitive credentials should be in .env file, not here
|
|
# Environment="PYTHONUNBUFFERED=1"
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|