From ce4b5bf2e76e3694a5e48734a6443737dfdc773a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 6 Jun 2022 13:25:31 +0200 Subject: [PATCH] Fix --- scripts/install | 18 +++++++++--------- scripts/upgrade | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/install b/scripts/install index d23958d..5665632 100644 --- a/scripts/install +++ b/scripts/install @@ -91,7 +91,7 @@ ynh_setup_source --dest_dir="$final_path" mkdir -p $final_path/sessions/ chmod 750 "$final_path" -#chown -R $app $final_path/{data,plugins,sessions} +chown -R $app $final_path/{data,plugins,sessions} chmod -R 700 $final_path/sessions chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -121,10 +121,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) ynh_script_progression --message="Configuring Kanboard..." dir="__DIR__" -ynh_add_config --template="../conf/config.php" --destination="$final_path/data/config.php" +ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" -chmod 400 "$final_path/data/config.php" -chown $app "$final_path/data/config.php" +chmod 400 "$final_path/config.php" +chown $app "$final_path/config.php" #================================================= # DATABASE INITIALIZATION @@ -163,16 +163,16 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=2 if [ $is_public -eq 1 ] then ynh_permission_update --permission="main" --add="visitors" - ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/data/config.php" - ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/data/config.php" - ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/data/config.php" - ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/data/config.php" + ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" else ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php" fi # Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$final_path/data/config.php" +ynh_store_file_checksum --file="$final_path/config.php" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 64d87f1..5c72a38 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data $final_path/config.php" fi mkdir -p $final_path/sessions/ @@ -158,10 +158,10 @@ ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=2 if [ $is_public -eq 1 ] then ynh_permission_update --permission="main" --add="visitors" - ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/data/config.php" - ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/data/config.php" - ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/data/config.php" - ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/data/config.php" + ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" else ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php" fi