diff --git a/Makefile b/Makefile index 7c1ec3effb5cea166649aedcba188d6974d2cb6f..495f3d3d15519f230f1562417aacd34c3f48d586 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ +# This file is a part of the Linkahead Project. # -# ** header v3.0 -# This file is a part of the CaosDB Project. -# +# Copyright (C) 2024 Daniel Hornung <d.hornung@indiscale.com> +# Copyright (C) 2024 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen # @@ -18,8 +18,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # -# ** end header -# + SHELL=/bin/bash INSTALL_SQL_FILE=db_5_0.sql diff --git a/config.defaults b/config.defaults index 1860377976c3bf0d9f389570dc0e981f47aa1609..d44a9f43fbedb1e7f3274825fb4cde99183cfff6 100644 --- a/config.defaults +++ b/config.defaults @@ -1,7 +1,7 @@ +# This file is a part of the LinkAhead Project. # -# ** header v2.0 -# This file is a part of the CaosDB Project. -# +# Copyright (C) 2024 Daniel Hornung <d.hornung@indiscale.com> +# Copyright (C) 2024 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen # @@ -15,11 +15,9 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # -# ** end header -# # # Commands # The MySQL client program. diff --git a/utils/helpers.sh b/utils/helpers.sh index 86f7d5981c7497fe478bccb3f391932585934545..f335dfa179e26e0237149572168884b554ee5f91 100644 --- a/utils/helpers.sh +++ b/utils/helpers.sh @@ -1,10 +1,10 @@ -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen -# Copyright (C) 2019, 2020 Daniel Hornung (d.hornung@indiscale.com) +# Copyright (C) 2019, 2020, 2024 Daniel Hornung (d.hornung@indiscale.com) # Copyright (C) 2020 Henrik tom Wörden -# Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> +# Copyright (C) 2020, 2024 IndiScale GmbH <info@indiscale.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -52,10 +52,16 @@ function mysql_execute_file { fi } +# Return the arguments from `get_db_args_nodb` and additionally the database name as +# `--database=mydatabasename`. function get_db_args { echo "$(get_db_args_nodb) --database=$DATABASE_NAME" } +# Return arguments for user, password, host, port and additional options in MYSQL_OPTS. +# +# For example, the output may be: +# --user=myuser --password=mypassword --host=example.com --port=1234 --other --option function get_db_args_nodb { if [ -n "$MYSQL_USER" ]; then mysql_con_arguments="--user=$MYSQL_USER" diff --git a/utils/load_settings.sh b/utils/load_settings.sh index d25dce5b1bf3b7a16ee62c67143ad0cd4e080cf1..398fb9e59df9efc56b84ddd03ed6782eb180a6d7 100644 --- a/utils/load_settings.sh +++ b/utils/load_settings.sh @@ -1,10 +1,10 @@ -# This file is a part of the CaosDB Project. +# This file is a part of the Linkahead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen -# Copyright (C) 2019, 2020 Daniel Hornung (d.hornung@indiscale.com) +# Copyright (C) 2019, 2020, 2024 Daniel Hornung <d.hornung@indiscale.com> # Copyright (C) 2020 Henrik tom Wörden -# Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> +# Copyright (C) 2020, 2024 IndiScale GmbH <info@indiscale.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -62,10 +62,12 @@ export MYSQL_CMD export MYSQLDUMP_CMD export MYSQLADMIN_CMD export MYSQL_CONFIG_EDITOR_CMD + export MYSQL_HOST export MYSQL_PORT export MYSQL_USER export MYSQL_OPTS + export DATABASE_NAME export DATABASE_USER export DATABASE_USER_PW diff --git a/utils/make_db b/utils/make_db index 35ed2d933ab3479f88556e08052b977bd2b0507c..c7f94fd2d57944758cb48f0aedb2ac2672ec16d3 100755 --- a/utils/make_db +++ b/utils/make_db @@ -1,10 +1,9 @@ #!/bin/bash -# ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # -# Copyright (C) 2021 Indiscale GmbH <info@indiscale.com> -# Copyright (C) 2019, 2020, 2021 Daniel Hornung <d.hornung@indiscale.com> +# Copyright (C) 2021, 2024 Indiscale GmbH <info@indiscale.com> +# Copyright (C) 2019, 2020, 2021, 2024 Daniel Hornung <d.hornung@indiscale.com> # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 Henrik tom Wörden <h.tomwoerden@indiscale.com> # Copyright (C) 2020 IndiScale <info@indiscale.com> @@ -22,7 +21,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # -# ** end header # Although some sanity checks are performed, this script still allows lots of SQL injection # possibilities.