Setup Script Option Introduced

This commit is contained in:
SimplifiedPrivacy 2026-07-22 20:40:11 -04:00
parent 4e6082913d
commit cc33803169
2 changed files with 41 additions and 1 deletions

40
cli/sudo_setup.py Normal file
View file

@ -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()

View file

@ -12,7 +12,7 @@ classifiers = [
"Operating System :: POSIX :: Linux", "Operating System :: POSIX :: Linux",
] ]
dependencies = [ dependencies = [
"sp-hydra-veil-core == 2.4.0", "sp-hydra-veil-core == 2.4.3",
] ]
[project.urls] [project.urls]