30 lines
577 B
Desktop File
30 lines
577 B
Desktop File
[Unit]
|
|
Description=News Agent - Daily Tech News Aggregator
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=%u
|
|
WorkingDirectory=/home/%u/news-agent
|
|
Environment="PATH=/home/%u/news-agent/.venv/bin:/usr/local/bin:/usr/bin"
|
|
|
|
# Run the news agent
|
|
ExecStart=/home/%u/news-agent/.venv/bin/python -m src.main
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=news-agent
|
|
|
|
# Resource limits
|
|
MemoryLimit=512M
|
|
CPUQuota=50%
|
|
|
|
# Restart policy (only on failure)
|
|
Restart=on-failure
|
|
RestartSec=5min
|
|
|
|
[Install]
|
|
WantedBy=default.target
|