fixed restart, scrapped python wrapper
This commit is contained in:
parent
f0eeb9aa75
commit
600b270928
|
@ -74,8 +74,12 @@ screen = re.match(r'^/usr/bin/screen$', screencheck)
|
|||
|
||||
if configfile:
|
||||
backend = config.get("wrapper", {}).get("backend", "daemon")
|
||||
daemonloc = config.get("wrapper", {}).get("daemonloc", "/usr/bin/daemon")
|
||||
screenloc = config.get("wrapper", {}).get("screenloc", "/usr/bin/screen")
|
||||
else:
|
||||
backend = False
|
||||
daemonloc = "/usr/bin/daemon"
|
||||
screenloc = "/usr/bin/screen"
|
||||
|
||||
try:
|
||||
runningcheck = subprocess.check_output("ps ax|grep cloudbot|"\
|
|
@ -3,6 +3,7 @@
|
|||
# Improved by Lukeroge
|
||||
# Further improved by neersighted
|
||||
from util import hook
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import time
|
||||
|
@ -19,7 +20,7 @@ def stop(inp, input=None, db=None, notice=None):
|
|||
else:
|
||||
input.conn.send("QUIT :Killed by " + input.nick + " (no reason)")
|
||||
time.sleep(5)
|
||||
subprocess.call("python cloudbot stop", shell=True)
|
||||
subprocess.call("./cloudbot stop", shell=True)
|
||||
|
||||
|
||||
@hook.command(autohelp=False)
|
||||
|
@ -33,8 +34,7 @@ def restart(inp, input=None, db=None, notice=None):
|
|||
else:
|
||||
input.conn.send("QUIT :Restarted by " + input.nick + " (no reason)")
|
||||
time.sleep(5)
|
||||
subprocess.call("python cloudbot restart", shell=True)
|
||||
|
||||
os.execl("./cloudbot", "restart")
|
||||
|
||||
@hook.command(autohelp=False)
|
||||
def clear(inp, input=None, db=None, notice=None):
|
||||
|
@ -43,7 +43,7 @@ def clear(inp, input=None, db=None, notice=None):
|
|||
notice("Only bot admins can use this command!")
|
||||
return
|
||||
time.sleep(5)
|
||||
subprocess.call("python ./cloudbot clear", shell=True)
|
||||
subprocess.call("./cloudbot clear", shell=True)
|
||||
|
||||
|
||||
@hook.command
|
||||
|
|
Reference in a new issue