33# gives a bit of time for the wifi to connect
44sleep 20
55# enable ssh
6- sudo systemctl enable ssh
6+ systemctl enable ssh
77# update and upgrade
8- sudo apt-get update -y
9- sudo apt-get upgrade -y
8+ apt-get update -y
9+ apt-get upgrade -y
1010# install programs
11- sudo apt-get install expect git zsh ufw python3-pip python3-venv -y
11+ apt-get install expect git zsh ufw python3-pip python3-venv -y
1212# change default shell for root and pi users
13- sudo chsh -s /bin/zsh pi
14- sudo chsh -s /bin/zsh
13+ chsh -s /bin/zsh pi
14+ chsh -s /bin/zsh
1515# install ohmyzsh for root and pi users
1616sudo -u pi sh -c " $( curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) " " " --unattended
17- sudo sh -c " $( curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) " " " --unattended
17+ sh -c " $( curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) " " " --unattended
1818
1919
2020# install drivers for adafruit screen
@@ -57,7 +57,7 @@ source /home/pi/controller_env/bin/activate
5757pip3 install -r /home/pi/requirements.txt
5858deactivate
5959# make controller program executable
60- sudo chmod +x /home/pi/controller.py
60+ chmod +x /home/pi/controller.py
6161# add controller program to PATH
6262echo " export PATH=\" /home/pi:$PATH \" " >> /home/pi/.zshrc
6363# set so that the controller starts up when a user logs in a virtual environment
@@ -76,7 +76,7 @@ python3 -m venv /root/gui_env
7676# download gui program from github
7777wget -P /root https://raw.githubusercontent.com/himalayanelixir/arduino-pi-ceiling-sculpture/master/raspberry-pi/gui.py
7878# make gui program executable
79- sudo chmod +x /root/gui.py
79+ chmod +x /root/gui.py
8080# add controller program to PATH
8181echo " export PATH=\" /root:$PATH \" " >> /root/.zshrc
8282# set so that the gui starts up on the adafruit screen when booted in a virtual environment
@@ -89,7 +89,7 @@ ufw default deny outgoing
8989# allow local ssh
9090ufw allow from 192.168.1.0/24 to any port 22
9191# enable ufw, will auto start on boot
92- echo " y" | sudo ufw enable
92+ echo " y" | ufw enable
9393
9494# tell pi to restart after one minute. This is needed for the ssh changes to work and for the adafruit screen drivers
95- sudo shutdown -r 1
95+ shutdown -r 1
0 commit comments