-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebsite.sh
More file actions
executable file
·46 lines (36 loc) · 1.35 KB
/
website.sh
File metadata and controls
executable file
·46 lines (36 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Author: Priyanshi Sarad
# Date Created: 10/2/2023
# Description:
# This script will host a website which I have taken from tooplate.com
# Usage:
# ./website.sh
# Also, don't forget to give the script execute permissions
# Installing httpd and dependencies.
echo "########################################"
echo "Updating the System and Installing Packages - httpd"
echo "########################################"
sudo yum update -y && yum upgrade -y > /dev/null
sudo yum install httpd wget unzip -y > /dev/null
echo "########################################"
echo "Start and Enable server"
echo "########################################"
sudo systemctl start httpd
sudo systemctl enable httpd
echo "########################################"
echo "Starting Artifact Deployment"
echo "########################################"
mkdir /tmp/website_data
cd /tmp/website_data
wget https://www.tooplate.com/zip-templates/2129_crispy_kitchen.zip > /dev/null
unzip 2129_crispy_kitchen.zip > /dev/null
sudo cp -r ./2129_crispy_kitchen/* /var/www/html/
echo "########################################"
echo "Restarting the Server"
echo "########################################"
sudo systemctl restart httpd
echo "########################################"
echo "CLEAN UP"
echo "########################################"
rm -rf /tmp/website_data
echo "Website is now ready"