diff --git a/linux.sh b/linux.sh old mode 100644 new mode 100755 index a7b7368..122f018 --- a/linux.sh +++ b/linux.sh @@ -19,4 +19,5 @@ echo "-----------------------------" sleep 2 curl ifconfig.me -This is week 4 - project test +echo -e "\n===========================" && sleep 2 +echo -e "This is week 4 - project test for \"$name\"\n Thank you" diff --git a/template b/template new file mode 100644 index 0000000..3d532b3 --- /dev/null +++ b/template @@ -0,0 +1,38 @@ +#!/bin/bash + +# check and update system +sudo yum check-update +sudo yum -y update # -y bypass inquiry step and automatically execute update + +# install Apache HTTP web server +sudo yum -y install httpd # install the Apache HTTP webserver + +# start the web server +sudo systemctl start httpd # start the web server +sudo systemctl enable httpd # enable the server for start up upon (re)boot +sudo systemctl status httpd # check the server status + + +# change directory ownership so current user can write in webser directory +sudo chown -R $USER:$USER /var/www +# change webserver directory attribute for all users to access webpage content +sudo chmod -R 755 /var/www +cd /var/www/html/ + +# write index.html using echo statements below +echo "" > index.html +echo "" >> index.html +echo " " >> index.html +echo " Level It Up ~!!!" >> index.html +echo " " >> index.html +echo " " >> index.html +echo " " >> index.html +echo "

Welcome to Level Up in Tech

" >> index.html +echo "

This web server is run on EC2 instance!!

" >> index.html +echo "

Date of creation: Feb. 10, 2023

" >> index.html +echo "

Date of correction: Feb. 11, 2023

" >> index.html +curl ifconfig.me >> index.html +echo "

Cheer Up, Gold Team!!

" >> index.html +echo " " >> index.html +echo "" >> index.html +# cat /var/www/html/index.html