This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new instructions new launcher arch-linux launcher script start script token.txt file does nothing atm does nothing atm
- Loading branch information
mickoissicko
committed
Jan 25, 2024
1 parent
bfc3f08
commit 20a5689
Showing
8 changed files
with
108 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|| Installing it is super simple now! | ||
|| Just read the docs @ mick.gdn/wiki/ussr.html | ||
|| Only change the paths, and when you are done, run the launcher.py file! >:) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# !launcher.py | ||
|
||
import os | ||
|
||
def setup_dependencies(): | ||
choice = input("Do you have the dependencies set up already? [y/n] ") | ||
if choice.lower() == 'n': | ||
os.chdir('archlinux/') | ||
os.system('chmod +x install.sh') | ||
os.system('./install.sh') | ||
os.chdir('..') | ||
|
||
def ussr_for_arch(): | ||
os.system('python setup/arch.py') | ||
|
||
def ussr_for_win(): | ||
os.system('python setup/win.py') | ||
|
||
def main_menu(): | ||
print("[1] Dependency setup") | ||
print("[2] USSR for Arch") | ||
print("[3] USSR for Windows") | ||
print("\nChoice: ") | ||
|
||
if __name__ == "__main__": | ||
while True: | ||
main_menu() | ||
choice = input() | ||
|
||
if choice == '1': | ||
setup_dependencies() | ||
elif choice == '2': | ||
ussr_for_arch() | ||
elif choice == '3': | ||
ussr_for_win() | ||
else: | ||
print("Invalid choice. Please choose again.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# setup/arch.py | ||
|
||
import os | ||
import webbrowser | ||
|
||
def main_menu(): | ||
print("[1] Launch USSR") | ||
print("[2] Use Ngrok") | ||
|
||
def launch_ussr(): | ||
os.chdir('setup/') | ||
|
||
if os.path.exists("token.txt"): | ||
with open("token.txt", "r") as file: | ||
autk = file.read().strip() | ||
print("Did you place the wrong copy-paste of the authentication token? [y/n]") | ||
wrong_token = input("Your answer: ").lower() | ||
|
||
if wrong_token == "y": | ||
os.remove("token.txt") | ||
print("Token deleted. Please enter your Ngrok authentication token again.") | ||
webbrowser.open("https://dashboard.ngrok.com/get-started/your-authtoken") | ||
autk = input("Your NGROK token: ") | ||
|
||
with open("token.txt", "w") as file: | ||
file.write(autk) | ||
elif wrong_token == "n": | ||
pass | ||
else: | ||
print("Invalid input. Assuming 'n'. Proceeding...") | ||
else: | ||
print("Enter your Ngrok authentication token:") | ||
webbrowser.open("https://dashboard.ngrok.com/get-started/your-authtoken") | ||
autk = input("Your NGROK token: ") | ||
|
||
with open("token.txt", "w") as file: | ||
file.write(autk) | ||
|
||
os.system(f"ngrok config add-authtoken {autk}") | ||
|
||
print("Starting the .sh script...") | ||
os.system("bash start.sh") | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
while True: | ||
main_menu() | ||
choice = input("Enter your choice: ") | ||
|
||
if choice == "1": | ||
launch_ussr() | ||
break | ||
elif choice == "2": | ||
print("Ngrok functionality not implemented yet.") | ||
break | ||
else: | ||
print("Invalid choice. Please enter 1 or 2.") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# !/bin/bash | ||
|
||
cd .. | ||
cd archlinux | ||
cd server-arch | ||
|
||
sudo python ussr-ssl.py |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# setup/win.py |
Empty file.