From cc33803169c2191dfab21e6bea495159fb51ee0c Mon Sep 17 00:00:00 2001 From: SimplifiedPrivacy Date: Wed, 22 Jul 2026 20:40:11 -0400 Subject: [PATCH] Setup Script Option Introduced --- cli/sudo_setup.py | 40 ++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 cli/sudo_setup.py diff --git a/cli/sudo_setup.py b/cli/sudo_setup.py new file mode 100644 index 0000000..9e6b0b9 --- /dev/null +++ b/cli/sudo_setup.py @@ -0,0 +1,40 @@ +from core.services.helpers.setup_sudo_scripts import auto_install_sudo_script, test_if_in_sudo_folder +from core.services.helpers.manage_assets import sudo_assets_folder_setup +from core.models.Result import Result, ResultError + +import sys + +choice = input(""" +The setup of the firewall & managed-DNS is just moving two bash scripts to a sudo protected folder. + +What would you like to do? +a) Run the script manually yourself, with "sudo bash setup.sh" +b) Get an automated installer. +""") + +if choice == "a": + results = sudo_assets_folder_setup() + print("Okay it copied the scripts to your Downloads folder in a folder named 'hydraveil_sudo_scripts'. Please review the scripts. Then when you're ready, run 'sudo bash setup.sh'") + + ran_it = input("Hit enter after you ran it to confirm it worked.") + confirmed = test_if_in_sudo_folder() + if confirmed.valid: + print("Confirmed it worked.") + else: + print(f"I'm sorry it did not work, {confirmed.message}") + +elif choice == "b": + results = auto_install_sudo_script() + if results.valid: + print("The setup script ran successfully. Testing..") + confirmed = test_if_in_sudo_folder() + if confirmed.valid: + print("Confirmed it worked.") + else: + print(f"I'm sorry it did not work, {confirmed.message}") + else: + print(f"Setup script did NOT work because {results.message}") + +else: + print(f"Invalid choice! You can't pick {choice}. Please run the script again, and pick 'a' or 'b'") + sys.exit() diff --git a/pyproject.toml b/pyproject.toml index 80b7d43..c0624a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ classifiers = [ "Operating System :: POSIX :: Linux", ] dependencies = [ - "sp-hydra-veil-core == 2.4.0", + "sp-hydra-veil-core == 2.4.3", ] [project.urls]