1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
[Unit]
Description=ifetch-tools web service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# run as the system user you already create in postinst
User=ifetch-tools
Group=ifetch-tools
# If your app expects a writable state dir, keep it in /var/lib
StateDirectory=ifetch-tools
WorkingDirectory=/var/lib/ifetch-tools
# logs: journald by default; keep syslog too if you want
SyslogIdentifier=ifetch-tools
# Start the actual daemon directly (native unit)
ExecStart=/usr/bin/wwwifetch
Restart=on-failure
RestartSec=5
# Optional hardening (safe defaults for many services)
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=full
ProtectHome=yes
[Install]
WantedBy=multi-user.target
|