From 535f9747a157306d44bb4b69deb93328059d84d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 3 Nov 2022 09:36:46 +0100 Subject: [PATCH] Fix --- conf/config.php | 2 +- scripts/_common.sh | 2 +- scripts/install | 1 + scripts/upgrade | 17 +---------------- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/conf/config.php b/conf/config.php index dbed7df..60ba8c5 100755 --- a/conf/config.php +++ b/conf/config.php @@ -21,4 +21,4 @@ define("MTT_DB_PREFIX", ""); // set mysqli if needed define("MTT_DB_DRIVER", "mysqli"); -define("MTT_SALT", "Put random text here"); +define("MTT_SALT", "__SALT__"); diff --git a/scripts/_common.sh b/scripts/_common.sh index 2271984..cc18e69 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="8.0" -pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" +pkg_dependencies="php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-pdo" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index c2ffb8b..8015fcf 100644 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC +salt=$(ynh_string_random --length=16) app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/upgrade b/scripts/upgrade index 1546864..aef7238 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,7 +73,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=2 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="db" + ynh_setup_source --dest_dir="$final_path" --keep="db config.php" fi chmod 750 "$final_path" @@ -103,21 +103,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# RESTORE USER RIGHTS -#================================================= -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 - -ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" - -chmod 600 "$final_path/config.php" -chown $app:$app "$final_path/config.php" - -ynh_secure_remove --file="$final_path/setup.php" - #================================================= # RELOAD NGINX #=================================================