This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
CloudBot/lib/restart.py

16 lines
319 B
Python
Raw Normal View History

2012-02-29 05:54:42 +01:00
#!/usr/bin/env python
# Tiny little restarter by neersighted
2012-02-29 06:09:40 +01:00
import sys
import os
import subprocess
2012-02-29 05:54:42 +01:00
if os.path.isfile("./control.sh"):
restart = "./control.sh restart"
elif os.path.isfile("./bot.sh"):
restart = "./bot.sh restart"
else:
restart = "./bot.py"
subprocess.call(restart, shell=True)
sys.exit()