-
Notifications
You must be signed in to change notification settings - Fork 113
/
.setup.aex
61 lines (55 loc) · 2.44 KB
/
.setup.aex
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Tool Name :- MyServer
# Author :- Rajkumar Dusad
# Date :- 29/7/2018
import sys
import os
from time import sleep
from core.system import *
from modules.logo import *
class setu(object):
def rem(self):
if os.path.exists(bpath+"myserver") or os.path.exists(spath+"MyServer"):
if system=="ubuntu":
os.system("sudo rm -rf "+spath+"MyServer && rm -rf "+bpath+"myserver")
os.system("cd "+spath+" && sudo rm -rf .path.aex .port.aex .host.aex .serv.lock .h.lock")
else:
os.system("rm -rf "+spath+"MyServer && rm -rf "+bpath+"myserver")
os.system("cd "+spath+" && rm -rf .path.aex .port.aex .host.aex .serv.lock .h.lock")
def setup(self):
self.rem()
if system=="ubuntu":
Mylogo()
print("\n\033[01;33m\007Installing MyServer .....\n")
os.system("sudo mkdir "+spath+"MyServer")
os.system("sudo mv -v core/myserver "+bpath)
os.system("sudo mv -v core modules MyServer.py .MyServer.py LICENSE "+spath+"MyServer")
os.system("sudo chmod +x "+bpath+"myserver")
os.system("sudo chmod +x "+spath+"MyServer/MyServer.py .MyServer.py")
os.system("sudo chmod +x "+spath+"MyServer/modules/* *.* .* .*.*")
os.system("sudo chmod +x "+spath+"MyServer/core/* *.* .* .*.*")
os.system("cd .. && sudo rm -rf MyServer")
sleep(1)
Mylogo()
print("\n\033[01;33m\007 [\033[01;31m+\033[01;33m] \033[01;32mInstalled MyServer.")
print("\033[01;33m [\033[01;31m+\033[01;33m] \033[01;32mType :- \033[01;33mmyserver help \033[01;32mfor more information.\033[00m\n")
else:
Mylogo()
print("\n\033[01;33m\007Installing MyServer .....\n")
os.system("mkdir "+spath+"MyServer")
os.system("mv -v core/myserver "+bpath)
os.system("mv -v core modules MyServer.py .MyServer.py LICENSE "+spath+"MyServer")
os.system("chmod +x "+bpath+"myserver")
os.system("chmod +x "+spath+"MyServer/MyServer.py .MyServer.py")
os.system("chmod +x "+spath+"MyServer/modules/* .* .*.* *.*")
os.system("chmod +x "+spath+"MyServer/core/* .* .*.* *.*")
os.system("cd .. && rm -rf MyServer")
sleep(1)
Mylogo()
print("\n\033[01;33m\007 [\033[01;31m+\033[01;33m] \033[01;32mInstalled MyServer.")
print("\033[01;33m [\033[01;31m+\033[01;33m] \033[01;32mType :- \033[01;33mmyserver help \033[01;32mfor more information.\033[00m\n")
def MyServer():
try:
setu().setup()
except KeyboardInterrupt:
exit()
MyServer()