diff --git a/.github/jobs/baseinstall.sh b/.github/jobs/baseinstall.sh index 2c61bc2a7b..2693b2406e 100755 --- a/.github/jobs/baseinstall.sh +++ b/.github/jobs/baseinstall.sh @@ -64,9 +64,7 @@ mysql_root "show databases" mysql_root "SELECT CURRENT_USER();" mysql_root "SELECT USER();" mysql_root "SELECT user,host FROM mysql.user" -echo "unused:sqlserver:domjudge:domjudge:domjudge:3306" > /opt/domjudge/domserver/etc/dbpasswords.secret -mysql_user "SELECT CURRENT_USER();" -mysql_user "SELECT USER();" +echo 'unused:sqlserver:domjudge:domjudge:domjudge_db-pw+% #$*)@(!/;,.:3306' > /opt/domjudge/domserver/etc/dbpasswords.secret section_end if [ "${db}" = "install" ]; then @@ -75,6 +73,7 @@ if [ "${db}" = "install" ]; then section_end elif [ "${db}" = "upgrade" ]; then section_start "Upgrade DOMjudge database" + /opt/domjudge/domserver/bin/dj_setup_database -uroot -proot update-password /opt/domjudge/domserver/bin/dj_setup_database -uroot -proot upgrade section_end fi @@ -139,4 +138,3 @@ elif [ "$version" = "all" ]; then mysql_root "UPDATE user SET teamid = 1 WHERE userid = 1;" domjudge fi section_end - diff --git a/.github/jobs/ci_settings.sh b/.github/jobs/ci_settings.sh old mode 100644 new mode 100755 index 350b07cf09..38608cb85f --- a/.github/jobs/ci_settings.sh +++ b/.github/jobs/ci_settings.sh @@ -29,11 +29,6 @@ mysql_root () { echo "$1" | mysql -uroot -proot ${2:-} | tee -a "$ARTIFACTS"/mysql.txt } -mysql_user () { - # shellcheck disable=SC2086 - echo "$1" | mysql -udomjudge -pdomjudge ${2:-} | tee -a "$ARTIFACTS"/mysql.txt -} - section_start () { if [ "$#" -ne 1 ]; then echo "Only 1 argument is needed for GHA, 2 was needed for GitLab." diff --git a/gitlab/base.sh b/gitlab/base.sh index a07f026d5b..9317ce825b 100755 --- a/gitlab/base.sh +++ b/gitlab/base.sh @@ -33,7 +33,7 @@ fi # Generate a dbpasswords file # Note that this does not use ${DATABASE_NAME} since Symfony adds the _test postfix itself -echo "unused:sqlserver:domjudge:domjudge:domjudge:3306" > etc/dbpasswords.secret +echo 'unused:sqlserver:domjudge:domjudge:domjudge_+% #$*)@(!/;,.:3306' > etc/dbpasswords.secret # Generate APP_SECRET for symfony # shellcheck disable=SC2164