From 92b105e43db05dc912e5a9877096abeb785577a7 Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 30 Dec 2021 14:12:37 +0100 Subject: [PATCH] Split config into several files --- conf/config.local.php | 9 ++++++ conf/config.local.release.php | 51 ------------------------------ conf/config.local.user.php | 13 ++++++++ conf/config.local.yunohost.php | 58 ++++++++++++++++++++++++++++++++++ scripts/_common.sh | 2 +- scripts/install | 23 ++++++-------- scripts/upgrade | 19 +++++------ 7 files changed, 101 insertions(+), 74 deletions(-) create mode 100644 conf/config.local.php delete mode 100644 conf/config.local.release.php create mode 100644 conf/config.local.user.php create mode 100644 conf/config.local.yunohost.php diff --git a/conf/config.local.php b/conf/config.local.php new file mode 100644 index 0000000..82b5400 --- /dev/null +++ b/conf/config.local.php @@ -0,0 +1,9 @@ +> $final_path/config.local.php +ynh_add_config --template="config.local.php" --destination="$final_path/config.local.php" +ynh_add_config --template="config.local.yunohost.php" --destination="$final_path/config.local.yunohost.php" +# NOTE: Don't overwrite config.local.user.php # Permissions on files and directories chmod -R o-rwx "$final_path" @@ -269,8 +270,9 @@ find "$final_path" -type d -exec chmod 550 {} + find "$final_path" -type f -exec chmod 440 {} + find "$final_path/data" -type d -exec chmod 770 {} + find "$final_path/data" -type f -exec chmod 660 {} + -chmod 660 "$final_path/config.local.php" -chmod 660 "$final_path/config.local.release.php" +chmod 440 "$final_path/config.local.php" +chmod 440 "$final_path/config.local.yunohost.php" +chmod 660 "$final_path/config.local.user.php" #================================================= # RELOAD NGINX @@ -285,7 +287,6 @@ ynh_systemd_action --service_name=nginx --action=reload ynh_script_progression --message="Finalise upgrade" --weight=1 ynh_local_curl "/admin/index.php" -chmod 440 "$final_path/config.local.php" #================================================= # END OF SCRIPT