-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaster.sh
More file actions
68 lines (61 loc) · 1.64 KB
/
Copy pathmaster.sh
File metadata and controls
68 lines (61 loc) · 1.64 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
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
if [ "$EUID" -ne 0 ]
then echo -e "Please run the script as root, or using sudo\n"
exit
fi
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
echo -e "Starting the installer...\n"
echo -e -n "The installer is running within the path: $PWD\n\n"
CONFIRM="n"
cat ./welcome.txt
echo -n "(1. Container Deployment/2. Standard Server): "
read -n 1 CONFIRM_INPUT
if [ -n "$CONFIRM_INPUT" ]; then
CONFIRM=$CONFIRM_INPUT
fi
general_installation() {
chmod +x ./.global/*.sh
chmod +x ./docker/*.sh
chmod +x ./standard/*.sh
apt update
./.global/reset_cache_to_install_node.sh
./.global/update_apt_repo.sh
# Check the exit status
if [ $? -eq 0 ]; then
echo "[RLABS APT CP] APT Processes is finished."
else
echo "[RLABS APT CP] APT Processes is failed. Failing the installer..."
exit
fi
./.global/install_pip_npm.sh
# Check the exit status
if [ $? -eq 0 ]; then
echo "[RLABS PIP+NPM CP] PIP+NPM Processes is finished."
else
echo "[RLABS PIP+NPM CP] PIP+NPM Processes is failed. Failing the installer..."
exit
fi
./.global/copy-configs.sh
# Check the exit status
if [ $? -eq 0 ]; then
echo "[RLABS CF CP] Configuration copying is finished."
else
echo "[RLABS CF CP] Configuration copying is failed. Failing the installer..."
exit
fi
}
echo
if [[ "${CONFIRM}" =~ ^[1]$ ]]; then
general_installation
./docker/docker_install.sh
echo -e -n "[RLABS Docker Installation] The installation is finished!"
else
if [[ "${CONFIRM}" =~ ^[2]$ ]]; then
general_installation
./standard/standard_install.sh
echo -e -n "[RLABS Standard Installation] The installation is finished!"
else
echo "Installation aborted!"
fi
fi