From 689eedf7e10eeb231afbf2ff8b63fd3c6f8d4096 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 10 Jun 2021 22:44:28 +0200 Subject: [PATCH 1/6] Update check_process Co-authored-by: Alexandre Aubin --- check_process | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 9a26695..1b95cfd 100644 --- a/check_process +++ b/check_process @@ -10,9 +10,9 @@ admin="john" (USER) is_public=1 (PUBLIC|public=1|private=0) language="fr" - dav_support=1 (DAV_SUPPORT|dav_support=1|dav_support=0) - signup=0 (SIGNUP|signup=1|signup=0) - two_factor=0 (TWO_FACTOR|two_factor=1|two_factor=0) + dav_support=1 + signup=0 + two_factor=0 ; Checks pkg_linter=1 setup_sub_dir=0 From 3d75e0f5f4e8040b78c09db0aca23f4a3fa115cc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 10 Jun 2021 22:46:01 +0200 Subject: [PATCH 2/6] Update scripts/install Co-authored-by: Alexandre Aubin --- scripts/install | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index db4da99..3514dd1 100755 --- a/scripts/install +++ b/scripts/install @@ -149,31 +149,38 @@ ynh_replace_string --match_string="language" --replace_string="$language" --targ # Enable or disable DAV support for users if [ $dav_support -eq 0 ] then - ynh_replace_string --match_string="__DAV__" --replace_string="false" --target_file="$config" + dav_boolean="false" dav="Yes" else - ynh_replace_string --match_string="__DAV__" --replace_string="true" --target_file="$config" + dav_boolean="true" dav="No" fi + # Enable or disable signup for public users if [ $signup -eq 1 ] then - ynh_replace_string --match_string="__SIGNUP__" --replace_string="false" --target_file="$config" + sign_boolean="false" sign="No" else - ynh_replace_string --match_string="__SIGNUP__" --replace_string="true" --target_file="$config" + sign_boolean="true" sign="Yes" fi + + # Enable or disable two factor authentication support for users if [ $two_factor -eq 1 ] then - ynh_replace_string --match_string="__TWO_FACTOR__" --replace_string="true" --target_file="$config" + twof_boolean="true" twof="Yes" else - ynh_replace_string --match_string="__TWO_FACTOR__" --replace_string="false" --target_file="$config" + twof_boolean="false" twof="No" fi +ynh_replace_string --match_string="__DAV__" --replace_string="$dav_boolean" --target_file="$config" +ynh_replace_string --match_string="__SIGNUP__" --replace_string="$sign_boolean" --target_file="$config" +ynh_replace_string --match_string="__TWO_FACTOR__" --replace_string="$twof_boolean" --target_file="$config" + #================================================= # DEPLOY #================================================= From 26bd8b345802be42b143e71ef3ba835c469b390c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 10 Jun 2021 22:46:33 +0200 Subject: [PATCH 3/6] Update scripts/upgrade Co-authored-by: Alexandre Aubin --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b32f5b7..1a4d3de 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -264,7 +264,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app: $final_path -chmod -R 775 "$final_path/storage" +chmod 775 "$final_path/storage" #================================================= # INSTALL THE CRON FILE From d04904460403eec4f5fbb08d1a801dfdffec0bf8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 10 Jun 2021 22:46:46 +0200 Subject: [PATCH 4/6] Update scripts/upgrade Co-authored-by: Alexandre Aubin --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1a4d3de..165ec36 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -100,7 +100,8 @@ then ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src - if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; then + if git -C "$final_path" rev-parse --is-inside-work-tree` >/dev/null 2>/dev/null + then pushd "$final_path" git fetch git checkout tags/$version From 2ccbcff046138c89459e935fd6b08bd221570c78 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 10 Jun 2021 22:46:59 +0200 Subject: [PATCH 5/6] Update scripts/restore Co-authored-by: Alexandre Aubin --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 4248aa3..d6748f6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -75,7 +75,7 @@ ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files chown -R $app: $final_path -chmod -R 775 "$final_path/storage" +chmod 775 "$final_path/storage" #================================================= # RESTORE THE PHP-FPM CONFIGURATION From f4aa0c3ba5b6fdef1897eb9b6ddd8502628a35b3 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 10 Jun 2021 22:47:06 +0200 Subject: [PATCH 6/6] Update scripts/install Co-authored-by: Alexandre Aubin --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 3514dd1..02965d2 100755 --- a/scripts/install +++ b/scripts/install @@ -228,7 +228,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions to app files chown -R $app: $final_path -chmod -R 775 "$final_path/storage" +chmod 775 "$final_path/storage" #================================================= # SETUP SSOWAT