From db88d4e5468084e37dbcf46361b04d22248e11fd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 19 Feb 2018 19:18:32 +0100 Subject: bin/sanity-check: go insane if mysql database is not sane --- bin/sanity-check | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/sanity-check b/bin/sanity-check index 39a2d10..601a940 100755 --- a/bin/sanity-check +++ b/bin/sanity-check @@ -105,7 +105,7 @@ touch "${tmp_dir}/messages" trap 'finish' EXIT if [ $# -eq 0 ]; then - set -- git-repositories build-list repos package-database state-files + set -- git-repositories build-list mysql repos package-database state-files fi while [ $# -gt 0 ]; do @@ -385,6 +385,26 @@ while [ $# -gt 0 ]; do ;; + mysql) + + [ ${silence} -gt 0 ] || \ + printf 'checking mysql-sanity-check-file ...' >> \ + "${tmp_dir}/messages" + + if [ -s "${webserver_directory}/mysql-sanity.html" ]; then + if [ ${silence} -le 1 ]; then + printf '\nThere is something wrong with the database:\n' + cat "${webserver_directory}/mysql-sanity.html" + fi + i_am_insane + fi + + [ ${silence} -gt 0 ] || \ + echo ' passed.' >> \ + "${tmp_dir}/messages" + + ;; + *) [ ${silence} -gt 1 ] || \ -- cgit v1.2.3-70-g09d2