From 09df39ba72a76e36470130cd771b7c612c663ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 May 2024 18:31:32 +0200 Subject: [PATCH] cleaning --- scripts/config | 3 +-- scripts/install | 4 ++-- scripts/upgrade | 16 +++------------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/scripts/config b/scripts/config index b9e79f8..d5f87dd 100644 --- a/scripts/config +++ b/scripts/config @@ -62,12 +62,11 @@ get__prices() { fi } - #================================================= # SPECIFIC VALIDATORS FOR TOML SHORT KEYS #================================================= -validate__publishable_key() { +validate__publishable_key() { # We can imagine here we test if the key is really a publisheable key (is_secret_key $publishable_key) && echo 'This key seems to be a secret key' diff --git a/scripts/install b/scripts/install index 7c69430..227b87a 100755 --- a/scripts/install +++ b/scripts/install @@ -37,9 +37,9 @@ ynh_add_nginx_config ynh_script_progression --message="Adding a configuration file..." --weight=1 if [ "$path" == "/" ]; then - ynh_add_config --template="../conf/config-subdomain.php" --destination="$install_dir/config.php" + ynh_add_config --template="config-subdomain.php" --destination="$install_dir/config.php" else - ynh_add_config --template="../conf/config-withpath.php" --destination="$install_dir/config.php" + ynh_add_config --template="config-withpath.php" --destination="$install_dir/config.php" fi chmod 400 "$install_dir/config.php" diff --git a/scripts/upgrade b/scripts/upgrade index b752d65..41e738d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,23 +9,13 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config.php" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="config.php" chown -R $app:www-data "$install_dir"