Files
fetch_x/deploy/fetch-x.service
T

22 lines
543 B
Desktop File

[Unit]
Description=Fetch selected X posts into SQLite
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=fetchx
WorkingDirectory=/opt/fetch-x
EnvironmentFile=/etc/fetch-x/fetch-x.env
ExecStart=/usr/bin/python3 /opt/fetch-x/fetch_x_posts.py @OpenAI @XDevelopers
StandardOutput=journal
StandardError=journal
# Avoid a hung API request blocking a subsequent scheduled run indefinitely.
TimeoutStartSec=10min
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/fetch-x