|
@@ -339,7 +339,8 @@ def _send_cmd(event=None,cmd=""):
|
|
|
#poll(delay=1.5)
|
|
|
|
|
|
def kill_librelight(event=None):
|
|
|
- for i in ["CONSOLE.py","EDITOR.py","ASP"]:
|
|
|
+ #for i in ["CONSOLE.py","EDITOR.py","ASP"]:
|
|
|
+ for i in ["ASP"]:
|
|
|
cmd='screen -XS "{}" quit | echo ""'.format(i)
|
|
|
print(cmd)
|
|
|
os.system(cmd)
|
|
@@ -352,7 +353,27 @@ def kill_librelight(event=None):
|
|
|
cmd="tool/TK-Nodescanner.py" #&"
|
|
|
arg = ""
|
|
|
os.execl("/usr/bin/python3", BASE_PATH, cmd,arg)
|
|
|
-
|
|
|
+
|
|
|
+def start_librelight(event=None):
|
|
|
+ #for i in ["CONSOLE.py","EDITOR.py","ASP"]:
|
|
|
+ for i in ["ASP"]:
|
|
|
+ cmd='screen -XS "{}" quit | echo ""'.format(i)
|
|
|
+ print(cmd)
|
|
|
+ os.system(cmd)
|
|
|
+
|
|
|
+ nodescan.is_running = 0 # exit all thread loop's
|
|
|
+
|
|
|
+ root.quit()
|
|
|
+ time.sleep(0.5)
|
|
|
+
|
|
|
+ BASE_PATH = "/opt/LibreLight/Xdesk/"
|
|
|
+ cmd="init/10-ASP.sh"
|
|
|
+ arg = ""
|
|
|
+ os.system(cmd)
|
|
|
+ #os.execl("/usr/bin/sh", BASE_PATH, cmd,arg)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
def set_ip(event=None):
|
|
|
print("SET NEW IP")
|
|
|
|
|
@@ -478,7 +499,11 @@ e_poll_new.option_add("end","215.0.0.0")
|
|
|
e_poll_new.pack(side="left")
|
|
|
#exit()
|
|
|
|
|
|
-b_scan = Tkinter.Button(fframe,text="KILL Librelight !",command=kill_librelight,width=14,font=font2,bg="red")
|
|
|
+b_scan = Tkinter.Button(fframe,text="Librelight:",font=font2,relief="flat",bg="orange")
|
|
|
+b_scan.pack(side="left",expand=0)
|
|
|
+b_scan = Tkinter.Button(fframe,text="KILL !",command=kill_librelight,width=6,font=font2,bg="red")
|
|
|
+b_scan.pack(side="left",expand=0)
|
|
|
+b_scan = Tkinter.Button(fframe,text="START ",command=start_librelight,width=6,font=font2,bg="green")
|
|
|
b_scan.pack(side="left",expand=0)
|
|
|
|
|
|
scrollbar = Tkinter.Scrollbar(cframe)
|