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
neersighted eec12aa9e4 pep8
2012-02-28 21:09:40 -08:00

16 lines
319 B
Python
Executable file

#!/usr/bin/env python
# Tiny little restarter by neersighted
import sys
import os
import subprocess
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()