123456789101112131415161718192021222324 |
- [Unit]
- Description=IRC bot
- Wants=network-online.target
- After=network.target network-online.target
- #After=network.target network-online.target stunnel4.service
- #Requires=stunnel4.service
- # Try to restart the bot during the first 16*60=960 seconds after failure:
- StartLimitIntervalSec=960
- # Try max 16 times:
- StartLimitBurst=16
- # To clear start limit counters: systemctl reset-failed bot.
- [Service]
- Type=forking
- PIDFile=/home/bot/profile/app.pid
- ExecStart=/home/bot/bot /home/bot/profile
- User=bot
- Restart=on-failure
- # Wait 60 seconds before a restart after failure:
- RestartSec=60
- [Install]
- WantedBy=multi-user.target
|