switched restarter to python
This commit is contained in:
parent
efecefbf19
commit
c014d91ec2
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env python
|
||||
# Tiny little restarter by neersighted
|
||||
import subprocess, sys, os
|
||||
|
||||
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()
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
sleep 5
|
||||
if [ -f ./control.sh ]; then
|
||||
./control.sh restart
|
||||
elif [ -f ./bot.sh ]; then
|
||||
./bot.sh restart
|
||||
else
|
||||
./bot.py
|
||||
fi
|
||||
exit 0
|
|
@ -1,10 +1,9 @@
|
|||
# Shitty plugin made by iloveportalz0r
|
||||
# Broken by The Noodle
|
||||
# Improved by Lukeroge
|
||||
# Further improved by neersighted
|
||||
from util import hook
|
||||
import sys
|
||||
import subprocess
|
||||
import time
|
||||
import sys, subprocess, time
|
||||
|
||||
@hook.command(autohelp=False)
|
||||
def quit(inp, input=None, db=None, notice=None):
|
||||
|
@ -30,7 +29,7 @@ def restart(inp, input=None, db=None, notice=None):
|
|||
else:
|
||||
input.conn.send("QUIT :Bot restarted by "+input.nick+" (no reason)")
|
||||
time.sleep(3)
|
||||
subprocess.call(['lib/restart.sh'])
|
||||
subprocess.call(['lib/restart.py'])
|
||||
sys.exit()
|
||||
|
||||
@hook.command
|
||||
|
|
Reference in New Issue