Skip to content

Commit

Permalink
Remove dulpicate configureUser.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
r4ulcl committed Dec 20, 2024
1 parent a33b847 commit 3bf056e
Showing 1 changed file with 7 additions and 36 deletions.
43 changes: 7 additions & 36 deletions vagrant/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ sudo ip link set wlan60 up' > /var/aux.sh
chmod +x /var/aux.sh

# Configure GUI when user open terminal first time, then delete
echo '#!/bin/bash
cat << 'EOF' > /etc/configureUser.sh
# Enable dock
gnome-extensions enable [email protected]
gnome-extensions enable [email protected]
Expand Down Expand Up @@ -241,6 +241,7 @@ gsettings set org.gnome.desktop.interface icon-theme "Adwaita"
sudo cp /var/WiFiChallengeLab-docker/certs/ca.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates
# Configure firefox for TLS
firefox &
CA_CERT_PATH="/var/WiFiChallengeLab-docker/certs/ca.crt"
PROFILE_PATH="$HOME/.mozilla/firefox"
PROFILE_DIR=$(ls $PROFILE_PATH | grep -E '\.default-release$')
Expand All @@ -261,39 +262,9 @@ certutil -A -n "WiFiChallenge CA" -t "C,," -d sql:$PROFILE_PATH/$PROFILE_DIR -i
sudo rm -rf /var/WiFiChallengeLab-docker/zerofile 2> /dev/null
# Auto delete
sed -i "s/bash \/etc\/configureUser.sh//g" /home/vagrant/.bashrc
' > /etc/configureUser.sh

echo 'bash /etc/configureUser.sh' >> /home/vagrant/.bashrc


# Configure GUI when user open terminal first time, then delete in ubuntu user
sudo tee /etc/configureUseruser.sh > /dev/null <<EOF
# Enable dock
gnome-extensions enable [email protected]
gnome-extensions enable [email protected]
gnome-extensions enable desktop-icons@csoriano
# Set background
gsettings set org.gnome.desktop.background picture-uri file:////opt/background/WiFiChallengeLab.png
sed -i "s/bash \/etc\/configureUser.sh//g" /home/vagrant/.bashrc 2> /dev/null
sed -i "s/bash \/etc\/configureUser.sh//g" /home/user/.bashrc 2> /dev/null
# Cron to monitor mode to nzyme
(crontab -l ; echo "* * * * * /var/aux.sh") | crontab -
# Dark theme
# Check if gnome-tweaks is installed
if ! [ -x "$(command -v gnome-tweaks)" ]; then
sudo apt-get -y install gnome-tweaks
fi
# Change theme to Adwaita-dark
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
# Change icon theme to Adwaita
gsettings set org.gnome.desktop.interface icon-theme "Adwaita"
# Auto delete
sed -i "s/bash \/etc\/configureUseruser.sh//g" /home/user/.bashrc
# Add Terminal to favorites
gsettings set org.gnome.shell favorite-apps "$(gsettings get org.gnome.shell favorite-apps | sed s/.$//), 'wireshark.desktop', 'org.gnome.Terminal.desktop']"
Expand All @@ -302,11 +273,11 @@ gsettings set org.gnome.shell favorite-apps "$(gsettings get org.gnome.shell fav
sudo sed -i "/$(echo 'media_WiFiChallenge /media/WiFiChallenge vboxsf uid=1000,gid=1000,_netdev 0 0' | sudo sed -e 's/[\/&]/\\&/g')/d" /etc/fstab
firefox &
EOF
#' >

echo 'bash /etc/configureUseruser.sh' >> /home/user/.bashrc
echo 'bash /etc/configureUser.sh' >> /home/vagrant/.bashrc
echo 'bash /etc/configureUser.sh' >> /home/user/.bashrc



# Enable SSH password login
Expand Down

0 comments on commit 3bf056e

Please sign in to comment.