-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbukkit.py
54 lines (46 loc) · 1.44 KB
/
bukkit.py
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
import os
import socket
from requests import get
# Get the version
os.system("clear")
print("Get your craftbukkit / spigot file.jar")
print("Then put it into the folder")
input("When you finished press ENTER...")
os.system("mv *.jar craftbukkit.jar")
os.system("sudo cp -r /opt/MCSS/bukkit/* .")
# 2
os.system("clear")
next = input("Do you want to modify properties [Y, n] ")
if next == 'Y' or next == 'y':
os.system("atom server.properties")
status = input("When you finished press enter... ")
# Public
os.system("clear")
public = input("Do you want to be avaiable world wide? [Y, n] ")
if public == 'Y' or public == 'y':
print("Open http://192.168.1.1")
private = socket.getfqdn()
print("Create a new portmap with 25565 as port and ", private, "as IP address")
input("Press enter when you finished: ")
public = get('https://api.ipify.org').text
status = 1
file = open("status.txt", "w")
file.write('1')
file.close()
else:
file = open("status.txt", "w")
file.write('0')
file.close()
# Informations
os.system("clear")
print("[SERVER IS READY]")
print("This is your IP address")
print("For you : localhost")
print("For your local network: ", private)
if status == 1:
print("WORLD WIDE: ", public)
os.system("chmod +x craftbukkit.sh")
os.system("sudo sh craftbukkit.sh >/dev/null")
os.system("sudo cp /opt/MCSS/bukstart.py .")
os.system("sudo rm bukkit.py")
# Needs to add start script as name bukstart.py