From 35ffe15f83457f5f697d2472418f9064734daefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 28 Feb 2024 08:36:15 +0100 Subject: [PATCH] cleaning --- scripts/install | 2 +- scripts/upgrade | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/scripts/install b/scripts/install index 3027206..81c8865 100644 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,7 @@ password_hash="$(cd $install_dir ; php$phpversion artisan tinker -q --no-ansi password_pash="${password_hash::-1}" # Remove last character # Populate MySQL database -ynh_add_config --template="../conf/init-mysql.sql" --destination="$install_dir/init-mysql.sql" +ynh_add_config --template="init-mysql.sql" --destination="$install_dir/init-mysql.sql" ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" < "$install_dir/init-mysql.sql" ynh_delete_file_checksum --file="$install_dir/init-mysql.sql" #REMOVEME? ynh_secure_remove --file="$install_dir/init-mysql.sql" diff --git a/scripts/upgrade b/scripts/upgrade index 4df9deb..cf7b033 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # SET MAINTENANCE MODE ON #================================================= @@ -25,14 +19,9 @@ exec_artisan "down" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep=".env bootstrap/cachet/production.php" -fi +ynh_setup_source --dest_dir="$install_dir" --keep=".env bootstrap/cachet/production.php" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"