-
Notifications
You must be signed in to change notification settings - Fork 0
/
web_install.sh
executable file
·48 lines (39 loc) · 1.16 KB
/
web_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
#!/bin/bash
# Installs with
# source <(curl -sS https://logicmoo.org/gitlab/logicmoo/logicmoo_workspace/-/raw/master/web_install.sh)
# source <(curl -sS https://raw.githubusercontent.com/logicmoo/logicmoo_workspace/master/web_install.sh)
if [[ $EUID -ne 0 ]]; then
echo ""
echo -e "\e[1;31mERROR This script must be run as root. \e[0m"
echo ""
return 1 2>/dev/null
exit 1
fi
apt install -y git screen docker docker.io
if git --version &>/dev/null; then
echo "Found Git";
else
echo ""
echo ""
echo -e "\e[1;31mERROR Require git but it's not installed. Aborting. \e[0m"
echo ""
return 1 2>/dev/null
exit 1
fi
mkdir -p /opt
(
cd /opt
if [ ! -d "logicmoo_workspace" ]; then
export SSLWAS=$(git config --global http.sslVerify)
git config --global http.sslVerify false
git clone --recursive https://gitlab.logicmoo.org/gitlab/logicmoo/logicmoo_workspace.git/
git config --global http.sslVerify $SSLWAS
fi
ls logicmoo_workspace
cd logicmoo_workspace
git pull -f
git status -s
(source ./INSTALL.md)
echo -e "\e[1;32m If Docker is installed: $LOGICMOO_WS/runFromDocker.sh
(otherwise: source $LOGICMOO_WS/StartLogicmoo.sh)\e[0m"
)