Skip to content

Commit 922bbc1

Browse files
committed
Added prerequisite installation to the Initial Setup script. No need to manually run them before Initial Setup.
1 parent a2f296d commit 922bbc1

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

initial_setup.py

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ def install_prereqs():
88
project_path = os.path.dirname(os.path.abspath(__file__))
99

1010
print("Updating Apt...")
11-
os.system('apt update &>/dev/null')
11+
os.system('apt update')
1212
print("Installing prerequisites via Apt...")
13-
os.system('apt sudo apt install python3 bundler libsqlite3-dev isc-dhcp-server hostapd &>/dev/null')
13+
os.system('apt install python3 bundler libsqlite3-dev isc-dhcp-server hostapd -y')
1414
print("Installing necessary Ruby Gems. This can take a few minutes...")
1515
os.system('bundle install --gemfile=' + project_path + '/Configuration\ App/Gemfile')
1616

@@ -47,13 +47,32 @@ def update_config_paths():
4747
print("###################################")
4848
print()
4949
print()
50-
run_setup_ans = input("Would you like to run the initial setup for RaspiWiFi? (y/n): ")
50+
install_prereqs_ans = input("Would you like to install prerequisite files (This can take up to 5 minutes)? (y/n): ")
5151

52-
if(run_setup_ans == 'y'):
52+
if(install_prereqs_ans == 'y'):
5353
print()
5454
print("Updating system...")
5555
install_prereqs()
56+
else:
57+
print()
58+
print()
59+
print("===================================================")
60+
print("---------------------------------------------------")
61+
print()
62+
print("No Prerequisites installed. Continuing to configuration file installation...")
63+
print()
64+
print("---------------------------------------------------")
65+
print("===================================================")
66+
print()
67+
print()
5668

69+
print()
70+
print()
71+
print()
72+
print()
73+
run_setup_ans = input("Would you like to run the initial setup for RaspiWiFi? (y/n): ")
74+
75+
if(run_setup_ans == 'y'):
5776
print("Updating config files and copying them...")
5877
update_config_paths()
5978

@@ -67,9 +86,15 @@ def update_config_paths():
6786
else:
6887
print()
6988
print()
89+
print("===================================================")
7090
print("---------------------------------------------------")
71-
print("---------------------------------------------------")
91+
print()
7292
print("RaspiWiFi initial setup cancelled. No changes made.")
93+
print()
94+
print("---------------------------------------------------")
95+
print("===================================================")
96+
print()
97+
print()
7398
sys.exit(0)
7499

75100
print()

0 commit comments

Comments
 (0)