-
Notifications
You must be signed in to change notification settings - Fork 7
/
restart
executable file
·36 lines (31 loc) · 1.23 KB
/
restart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/python3
import os
import sys
if "airiana-core.py" in sys.argv or len(sys.argv) == 1:
os.system("sudo systemctl restart airiana.service &")
os.system("sleep 1")
os.system("systemctl status airiana.service |tail -c 2000")
if "controller" in sys.argv:
os.system("sudo systemctl restart controller.service")
# os.system("sleep 5")
os.system("sudo systemctl status controller.service |tail -c 2000")
if "status.py" in sys.argv:
os.system("sudo pkill --signal 15 alive_logger.py")
os.system("sudo systemctl restart status.service&")
os.system("systemctl status status.service |tail -c 2000")
# os.system("sudo ./status.py & > /dev/null")
if "envlogger.py" in sys.argv:
os.system("sudo pkill --signal 15 envlogger.py")
os.system("./envlogger.py 135 > /dev/null &")
os.system("./envlogger.py 91 > /dev/null &")
os.system("./envlogger.py 92 > /dev/null &")
os.system("./envlogger.py 93 > /dev/null &")
os.system("./envlogger.py 94 > /dev/null &")
#os.system("./envlogger.py 11 > /dev/null &")
if "alive_logger.py" in sys.argv:
os.system("sudo pkill --signal 15 alive_logger.py")
os.system("./alive_logger.py > /dev/null &")
if "http" in sys.argv:
os.system("sudo pkill --signal 15 httpsrv.py")
os.system("./http")
os.system("disown")