From 951871400d8842d4269bf792fac882f6a9322c05 Mon Sep 17 00:00:00 2001 From: Amo Date: Tue, 25 May 2021 05:21:07 +0530 Subject: [PATCH 1/4] Fix install and upgrade --- scripts/install | 2 +- scripts/upgrade | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 129d95b..4c3ba34 100644 --- a/scripts/install +++ b/scripts/install @@ -74,7 +74,7 @@ ynh_script_progression --message="Setting up source files..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path # 1- Clone stable repo -$git clone https://github.com/friendica/friendica.git -b stable "$final_path" +git clone https://github.com/friendica/friendica.git -b stable "$final_path" # Copy .htaccess-dist to ..htaccess cp -f "$final_path/.htaccess-dist" "$final_path/.htaccess" diff --git a/scripts/upgrade b/scripts/upgrade index 01fc9b1..25c925e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,14 +125,13 @@ else # Remove the addon directory securely ynh_secure_remove "$final_path/addon" - - # Remove addon - ynh_secure_remove "$final_path/addon" + # Download, check integrity, uncompress and patch addons ynh_setup_source --dest_dir="$final_path/addon" --source_id="addons" # Restore the smarty3 folder cp -a "$tmpdir/view/smarty3" "${final_path}" + ynh_secure_remove "$tmpdir" fi fi From 763d406faeeb27781a5d931d64fa9bd4546c75cd Mon Sep 17 00:00:00 2001 From: Amo Date: Tue, 25 May 2021 10:06:34 +0530 Subject: [PATCH 2/4] Not show the stdout warnings --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4c3ba34..1aee2a1 100644 --- a/scripts/install +++ b/scripts/install @@ -142,7 +142,7 @@ ynh_store_file_checksum --file="$final_path/config/local.config.php" # Run composer pushd "$final_path" - php$phpversion bin/composer.phar install + php$phpversion bin/composer.phar install 2> /dav/null bin/console config system addon ldapauth popd ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');" diff --git a/scripts/upgrade b/scripts/upgrade index 25c925e..6b197bc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -196,7 +196,7 @@ cp "../conf/poller-cron" "/etc/cron.d/$app" # Run composer pushd "$final_path" - php$phpversion bin/console dbstructure update + php$phpversion bin/console dbstructure update 2> /dev/null bin/console config system addon ldapauth popd From 9bef5a1c881926c22bc77772ec407c2ab997d2a6 Mon Sep 17 00:00:00 2001 From: Amo Date: Tue, 25 May 2021 18:22:48 +0530 Subject: [PATCH 3/4] Not show the stdout warnings --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1aee2a1..97294b2 100644 --- a/scripts/install +++ b/scripts/install @@ -142,7 +142,7 @@ ynh_store_file_checksum --file="$final_path/config/local.config.php" # Run composer pushd "$final_path" - php$phpversion bin/composer.phar install 2> /dav/null + php$phpversion bin/composer.phar install 2>/dev/null bin/console config system addon ldapauth popd ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');" From 1b02a9708deaf8b539d7b7e9b49150a2bc9b2d4c Mon Sep 17 00:00:00 2001 From: Amo Date: Tue, 25 May 2021 22:07:43 +0530 Subject: [PATCH 4/4] Added update and restore in check_process --- check_process | 1 + 1 file changed, 1 insertion(+) diff --git a/check_process b/check_process index 5db0593..d073319 100644 --- a/check_process +++ b/check_process @@ -11,6 +11,7 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=b3642c110f0e927ba36ee32e738a81e6afce958f7ackup_restore=1 + backup_restore=1 multi_instance=1 port_already_use=0 change_url=0