forked from crowell/Security-Lab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·30 lines (25 loc) · 704 Bytes
/
setup.sh
File metadata and controls
executable file
·30 lines (25 loc) · 704 Bytes
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
echo_bold () {
message=${1}
echo -e "\033[1m${message}\033[0m"
}
echo_bold "Copying Apache2 config..."
cp apache2.conf /etc/apache2/apache2.conf
echo_bold "Clearing web server files...."
rm -fr /var/www/*
echo_bold "Copying files to web server...."
cp -R lab/* /var/www/
echo_bold "Changing permissions....."
./chmodder.sh
echo_bold "Starting mysql........."
mysql_status=$(service mysql start |grep "already running");
if [ -z "$mysql_status"]
then
service mysql restart
fi
echo_bold "Seeding the mysql database........."
./seed.sh
echo_bold "Starting apache2..........."
service apache2 restart
echo_bold "haxing boxes........"
cat motd.txt > /etc/motd
echo_bold "ready!"