Skip to content

Commit

Permalink
fixed color
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremehancock committed Oct 26, 2019
1 parent 5072e1c commit 42264a4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions build.sh
Expand Up @@ -49,69 +49,69 @@ if [ -f "$picheck" ]; then
echo -e "\e[96m*************************** Run Bootstrap ***************************\e[0m"
bash setup/bootstrap.sh

echo -e "\e[32m*************************** Set Permissions *************************\e[0m"
echo -e "\e[96m*************************** Set Permissions *************************\e[0m"
sudo chown -R pi: /var/www/html
sudo chmod g+wx -R /var/www/html

echo -e "\e[32m*************************** Install Dashboard ***********************\e[0m"
echo -e "\e[96m*************************** Install Dashboard ***********************\e[0m"
cp -r "localhost/www/html" "/var/www/"
echo "<?php \$github_user = \"$git_user\"; ?>" > /var/www/html/config/github-config.php

echo -e "\e[32m*************************** Clone Repos *****************************\e[0m"
echo -e "\e[96m*************************** Clone Repos *****************************\e[0m"
for i in "${git_array[@]}"; do
if [ ! -d /var/www/html/"${i^^}" ]; then
git clone git@github.com:"$git_user"/"$i" /var/www/html/"${i^^}"
fi
done

echo -e "\e[32m*************************** Remove Default Index File ***************\e[0m"
echo -e "\e[96m*************************** Remove Default Index File ***************\e[0m"
if [ -f "/var/www/html/index.html" ]; then
rm /var/www/html/index.html
fi

echo -e "\e[32m*************************** Enable VNC ******************************\e[0m"
echo -e "\e[96m*************************** Enable VNC ******************************\e[0m"
if [ ! -f "/etc/systemd/system/multi-user.target.wants/vncserver-x11-serviced.service" ]; then
sudo ln -s /usr/lib/systemd/system/vncserver-x11-serviced.service /etc/systemd/system/multi-user.target.wants/vncserver-x11-serviced.service
sudo systemctl start vncserver-x11-serviced
fi

echo -e "\e[32m*************************** Set Timezone ****************************\e[0m"
echo -e "\e[96m*************************** Set Timezone ****************************\e[0m"
sudo timedatectl set-timezone "$timezone"

echo -e "\e[32m*************************** Set Locales *****************************\e[0m"
echo -e "\e[96m*************************** Set Locales *****************************\e[0m"
sudo perl -pi -e 's/# "$locales_part1" "$locales_part2"/"$locales_part1" $locales_part2"/g' /etc/locale.gen
sudo locale-gen "$locales_part1"
sudo update-locale "$locales_part2"

echo -e "\e[32m*************************** Expand Filesystem ***********************\e[0m"
echo -e "\e[96m*************************** Expand Filesystem ***********************\e[0m"
sudo raspi-config --expand-rootfs

echo -e "\e[32m*************************** Set Hostname ****************************\e[0m"
echo -e "\e[96m*************************** Set Hostname ****************************\e[0m"
if [[ "$hostname" == "" ]]; then
sudo hostnamectl set-hostname "pizero.local"
else
sudo hostnamectl set-hostname "$hostname"
fi

echo -e "\e[32m*************************** Set Password ****************************\e[0m"
echo -e "\e[96m*************************** Set Password ****************************\e[0m"
sudo usermod -p "$pi_password" pi

echo -e "\e[32m*************************** Process Complete Rebooting **************\e[0m"
echo -e "\e[96m*************************** Process Complete Rebooting **************\e[0m"
sudo reboot now

else

echo -e "\e[32m*************************** Create GitHub Config ********************\e[0m"
echo -e "\e[96m*************************** Create GitHub Config ********************\e[0m"
echo "<?php \$github_user = \"$git_user\"; ?>" > localhost/www/html/config/github-config.php

echo -e "\e[32m*************************** Destroy Previous Vagrant ****************\e[0m"
echo -e "\e[96m*************************** Destroy Previous Vagrant ****************\e[0m"
vagrant destroy -f

echo -e "\e[32m*************************** Run Vagrant Up **************************\e[0m"
echo -e "\e[96m*************************** Run Vagrant Up **************************\e[0m"
vagrant up


echo -e "\e[32m*************************** Clone Repos *****************************\e[0m"
echo -e "\e[96m*************************** Clone Repos *****************************\e[0m"
for i in "${git_array[@]}"; do
if [ ! -d localhost/www/html/"${i^^}" ]; then
git clone git@github.com:"$git_user"/"$i" localhost/www/html/"${i^^}"
Expand Down

0 comments on commit 42264a4

Please sign in to comment.