Skip to content

Commit a2f296d

Browse files
committed
Begining work on automated prerequisite installs during the initial setup script
1 parent 4a184dc commit a2f296d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

initial_setup.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
import sys
55

66

7+
def install_prereqs():
8+
project_path = os.path.dirname(os.path.abspath(__file__))
9+
10+
print("Updating Apt...")
11+
os.system('apt update &>/dev/null')
12+
print("Installing prerequisites via Apt...")
13+
os.system('apt sudo apt install python3 bundler libsqlite3-dev isc-dhcp-server hostapd &>/dev/null')
14+
print("Installing necessary Ruby Gems. This can take a few minutes...")
15+
os.system('bundle install --gemfile=' + project_path + '/Configuration\ App/Gemfile')
716

817
def update_config_paths():
918
project_path = os.path.dirname(os.path.abspath(__file__))
@@ -42,8 +51,10 @@ def update_config_paths():
4251

4352
if(run_setup_ans == 'y'):
4453
print()
45-
print("Running initial configuration...")
46-
54+
print("Updating system...")
55+
install_prereqs()
56+
57+
print("Updating config files and copying them...")
4758
update_config_paths()
4859

4960
os.system('sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf')

0 commit comments

Comments
 (0)