-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathconfig-dist.sh
97 lines (82 loc) · 3.08 KB
/
config-dist.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#! /bin/bash
if [ "$BASH" = "" ] ;then echo "Please run with bash"; exit 1; fi
INSTALLED_JAVA_VER=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F '.' '{sub("^$", "0", $2); print $1$2}')
if [[ $INSTALLED_JAVA_VER -lt 170 ]];
then
echo 'These scripts expect Java 17.0 or higher (Sakai-25 and later)'
java --version
echo Try these commands:
echo
echo sdk install java 17.0.13-tem
echo sdk use java 17.0.13-tem
echo
exit
fi
# If you want to change this file (and you should)
# Simply copy it to config.sh and make your changes
# there so git ignores your local copy.
# Check to see if we are overriden - but only do it once
if [ -f "config.sh" -a "$1" == "" ]
then
echo "Taking configuration from local config.sh"
source config.sh include
return
exit
elif [ "$1" == "" ]
then
echo
echo "Using setup defaults from config-dist.php."
echo "If you want to override configuration settings, copy"
echo "config-dist.sh to config.sh and edit config.sh"
echo
fi
# Settings start here
# Change GIT_REPO and replace "sakaiproject" with your git user name
# so that you checkout your forked sakai repository
GIT_REPO=https://github.com/sakaiproject/sakai.git
TIMEZONE="US/Eastern"
# Set this to the MYSQL root passsword. MAMP's default
# is root so you can leave it alone if you are using MAMP
MYSQL_ROOT_PASSWORD=root
MYSQL_ROOT_USER=root
MYSQL_HOST=localhost
MYSQL_PORT=3306
LOCAL_HOST_ACCESS=localhost
MYSQL=8.0.25
MYSQL=maria
TOMCAT=9.0.21
THREADS=1
# Leave LOG_DIRECTORY value empty to leave the logs inside tomcat
# LOG_DIRECTORY=/var/www/html/sakai/logs/tomcat
LOG_DIRECTORY=
PORT=8080
SHUTDOWN_PORT=8005
MYSQL_DATABASE=sakai25
MYSQL_USER=sakaiuser
MYSQL_PASSWORD=sakaipass
# Defaults for Mac/MAMP MySQL
if [ -f "/Applications/MAMP/Library/bin/mysql80/bin/mysql" ] ; then
echo "You are using MAMP..."
MYSQL_PORT=8889
MYSQL_SOURCE="jdbc:mariadb://127.0.0.1:8889/$MYSQL_DATABASE?useUnicode=true\&characterEncoding=UTF-8"
MYSQL_COMMAND="/Applications/MAMP/Library/bin/mysql80/bin/mysql -S /Applications/MAMP/tmp/mysql/mysql.sock -u $MYSQL_ROOT_USER --password=$MYSQL_ROOT_PASSWORD"
# Defaults for Mac/MAMP MySQL on 3306
elif [ -f "/Applications/XAMPP/xamppfiles/bin/mysql" ] ; then
echo "You are using XAMPP..."
MYSQL_ROOT_PASSWORD=
MYSQL_SOURCE="jdbc:mariadb://$MYSQL_HOST:3306/$MYSQL_DATABASE?useUnicode=true\&characterEncoding=UTF-8"
MYSQL_COMMAND="/Applications/XAMPP/xamppfiles/bin/mysql --port=$MYSQL_PORT"
# Ubuntu / normal 3306 MariaDB
else
echo "Using command line SQL"
MYSQL_COMMAND="mysql -u $MYSQL_ROOT_USER --host=$MYSQL_HOST --port=$MYSQL_PORT --password=$MYSQL_ROOT_PASSWORD"
MYSQL_SOURCE="jdbc:mariadb://$MYSQL_HOST:$MYSQL_PORT/$MYSQL_DATABASE?useUnicode=true\&characterEncoding=UTF-8"
fi
# Make sure sdkman is setup - even if we are running disconnected from a terminal
if [ "$JAVA_HOME" = "" ] ;then
echo "Setting up sdkman..."
export HOME=~
unset SDKMAN_DIR
[ -f ~/.sdkman/bin/sdkman-init.sh ] && source ~/.sdkman/bin/sdkman-init.sh
echo JAVA_HOME $JAVA_HOME
fi