Files
r0b3BOT/r0b3bot.service.example
2019-11-14 13:46:43 -05:00

15 lines
368 B
Plaintext

[Unit]
Description=r0b3bot
After=network.target
[Service]
User=root #Change as needed (root not recommended)
Type=forking
Restart=on-failure
RestartSec=3
WorkingDirectory=/path/to/r0b3BOT
ExecStart=/usr/bin/screen -L -dmS pi python /path/to/r0b3bot.py
ExecStop=/usr/bin/kill $(ps aux | grep "SCREEN.*r0b3bot" | awk '{print $2}')
[Install]
WantedBy=multi-user.target