-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
53 lines (39 loc) · 1016 Bytes
/
setup.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
#!/usr/bin/env bash
set -e
GLUU_INSTALLER_REPO="https://github.com/socheatsok78/gluu-installer"
GLUU_INSTALLER_DIR="gluu-installer"
function apt_update() {
echo ">>> Updating APT Repository..."
apt-get update -qq
}
function apt_install_git() {
echo ">>> Installing GIT..."
apt-get install -y git
}
function clone_installer_repo() {
echo ">>> Cloning $GLUU_INSTALLER_REPO to $GLUU_INSTALLER_DIR folder"
if ! [ `command -v git` ]; then
apt_update
apt_install_git
fi
git clone "$GLUU_INSTALLER_REPO" "$GLUU_INSTALLER_DIR"
}
function gluu_setup() {
# Check if directory exists
if ! [ -d "$GLUU_INSTALLER_DIR" ]; then
exit 1;
fi
cd "$GLUU_INSTALLER_DIR"
echo ">>> Checking executable"
chmod +x ./install-gluu.sh
chmod +x ./deploy.sh
chmod +x ./scripts/post-install.sh
echo ">>> Running scripts"
./install-gluu.sh
}
function main() {
clone_installer_repo
gluu_setup
}
# Running main()
main