File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ alias section_end='trace_off ; section_end_internal '
19
19
20
20
export version=" $1 "
21
21
22
+ MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:- root}
23
+
22
24
set -eux
23
25
24
26
section_start " Update packages"
@@ -85,11 +87,11 @@ section_end
85
87
86
88
if [ " ${db} " = " install" ]; then
87
89
section_start " Install DOMjudge database"
88
- /opt/domjudge/domserver/bin/dj_setup_database -uroot -proot bare-install
90
+ /opt/domjudge/domserver/bin/dj_setup_database -uroot -p ${MYSQL_ROOT_PASSWORD} bare-install
89
91
section_end
90
92
elif [ " ${db} " = " upgrade" ]; then
91
93
section_start " Upgrade DOMjudge database"
92
- /opt/domjudge/domserver/bin/dj_setup_database -uroot -proot upgrade
94
+ /opt/domjudge/domserver/bin/dj_setup_database -uroot -p ${MYSQL_ROOT_PASSWORD} upgrade
93
95
section_end
94
96
fi
95
97
@@ -125,9 +127,11 @@ for service in nginx php${PHPVERSION}-fpm; do
125
127
done
126
128
section_end
127
129
128
- section_start " Install the example data"
129
- /opt/domjudge/domserver/bin/dj_setup_database -uroot -proot install-examples
130
- section_end
130
+ if [ " ${db} " = " install" ]; then
131
+ section_start " Install the example data"
132
+ /opt/domjudge/domserver/bin/dj_setup_database -uroot -p${MYSQL_ROOT_PASSWORD} install-examples | tee -a " $ARTIFACTS /mysql.txt"
133
+ section_end
134
+ fi
131
135
132
136
section_start " Setup user"
133
137
# We're using the admin user in all possible roles
You can’t perform that action at this time.
0 commit comments