From 5fbb7d26a4a0235c377599af6d77df137a4f200c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 27 Dec 2023 17:26:40 +0100 Subject: [PATCH] Simplify handling of local-production.json --- conf/local-production.json | 2 -- scripts/install | 3 ++- scripts/upgrade | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 conf/local-production.json diff --git a/conf/local-production.json b/conf/local-production.json deleted file mode 100644 index 2c63c08..0000000 --- a/conf/local-production.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/scripts/install b/scripts/install index ff9bc24..dea5d37 100644 --- a/scripts/install +++ b/scripts/install @@ -97,7 +97,8 @@ ynh_add_config --template="production.yaml" --destination="$install_dir/config/p chmod 400 "$install_dir/config/production.yaml" chown $app:$app "$install_dir/config/production.yaml" -ynh_add_config --template="local-production.json" --destination="$install_dir/config/local-production.json" +# Initialize local setting conf file +echo '{}' > "$install_dir/config/local-production.json" chmod 600 "$install_dir/config/local-production.json" chown $app:$app "$install_dir/config/local-production.json" diff --git a/scripts/upgrade b/scripts/upgrade index 3a8fd3e..3ba9adc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -130,7 +130,6 @@ ynh_add_config --template="../conf/production.yaml" --destination="$install_dir/ chmod 400 "$install_dir/config/production.yaml" chown $app:$app "$install_dir/config/production.yaml" -ynh_backup_if_checksum_is_different --file="$install_dir/config/local-production.json" chmod 600 "$install_dir/config/local-production.json" chown $app:$app "$install_dir/config/local-production.json"