-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·69 lines (50 loc) · 1.27 KB
/
install.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
scriptversion="1.0"
backtitle="Version $scriptversion"
whiptitle="Setup nginx & commandbox"
export backtitle
export whiptitle
. ./_installhelpers.sh --source-only
#---------------------
#root permission check
#---------------------
if [ "$(whoami)" != "root" ]; then
whiptail --title "$whiptitle" --backtitle "$backtitle" "Sorry, you need to run this script using sudo or as root." 8 60
exit 1
fi
#------------------
#cancel opportunity
#------------------
if (! whiptail --title "$whiptitle" --backtitle "$backtitle" --yesno "This script will configure nginx and commandbox. Do you want to continue?" 10 40 )
then
abort
else
#------------------------------
#make sure scripts are runnable
#------------------------------
chown -R root scripts/*.sh
chmod u+x scripts/*.sh
fi
#----------------------
#Get all the user input
#----------------------
getUserInputs
separator
echo "Updating/Upgrading system"
separator
#update ubuntu software
./scripts/100-ubuntu-update.sh
separator
echo "Downloading commandbox"
#download commandbox
./scripts/200-commandbox.sh
separator
echo "Installing nginx"
#install nginx
./scripts/300-nginx.sh
separator
echo "Setting up commandbox"
#configure commandbox
./scripts/400-config.sh
separator
getSetupComplete