Getting the skeleton together

This commit is contained in:
neersighted 2012-02-29 01:16:21 -08:00
parent e1d3e20758
commit d4a930dffb

View file

@ -17,6 +17,7 @@ print "| ,----'| | | | | | | | | | | .--. || |_) | | | | | `-
print "| | | | | | | | | | | | | | | || _ < | | | | | | " print "| | | | | | | | | | | | | | | || _ < | | | | | | "
print "| `----.| `----.| `--' | | `--' | | '--' || |_) | | `--' | | | " print "| `----.| `----.| `--' | | `--' | | '--' || |_) | | `--' | | | "
print " \______||_______| \______/ \______/ |_______/ |______/ \______/ |__| " print " \______||_______| \______/ \______/ |_______/ |______/ \______/ |__| "
print "http://git.io/cloudbot by lukeroge"
if (len(sys.argv) > 1): if (len(sys.argv) > 1):
if( sys.argv[1] == 'start' ): if( sys.argv[1] == 'start' ):
@ -27,15 +28,16 @@ if (len(sys.argv) > 1):
command = restart command = restart
else: else:
print "usage: ./cloudbot {start|stop|restart}" print "usage: ./cloudbot {start|stop|restart}"
sys.exit()
else: else:
print "usage: ./cloudbot {start|stop|restart}" print "usage: ./cloudbot {start|stop|restart}"
''' sys.exit()
if os.path.isfile("./control.sh"):
command = "./control.sh command" if os.path.isfile("./bot.py"):
elif os.path.isfile("./bot.sh"): command = command
command = "./bot.sh command"
else: else:
command = "./bot.py" print "Could not find bot.py! Are you in the wrong folder? (" + pwd + ")"
''' sys.exit()
subprocess.call(command, shell=True) subprocess.call(command, shell=True)
sys.exit() sys.exit()