From 641378c9e07338c26cf082104f3bdff6d8ee3a39 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sat, 9 Jun 2018 17:32:58 +0530 Subject: [PATCH] Fixed install and upgrade script --- scripts/install | 3 +++ scripts/upgrade | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 585e337..d32b6c3 100644 --- a/scripts/install +++ b/scripts/install @@ -102,6 +102,9 @@ ynh_system_user_create $app # Create a dedicated php-fpm config ynh_add_fpm_config +# copy index file +sudo cp ../conf/index.php $final_path/ + # Change variable in yourls configuration sudo cp ../conf/config.php $final_path/user/config.php diff --git a/scripts/upgrade b/scripts/upgrade index 37583a8..96841a8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,9 +62,10 @@ path_url=$(ynh_normalize_url_path $path_url) # Download, check integrity, uncompress and patch the source from app.src # Create a temporary directory along with /user/plugin sub directory in it tmpdir="$(mktemp -d)" -mkdir -p "$tmpdir/user" +mkdir -p "$tmpdir/user/" # Backup the app files in the temp dir +sudo cp -a "$final_path/index.php" "$tmpdir" sudo cp -a "$final_path/.htaccess" "$tmpdir" sudo cp -a "$final_path/user/config.php" "$tmpdir/user" @@ -75,6 +76,7 @@ ynh_secure_remove "$final_path" ynh_setup_source "$final_path" # Copy the app files from tmp to final_path +sudo cp -a "$tmpdir/index.php" "$final_path" sudo cp -a "$tmpdir/.htaccess" "$final_path" sudo cp -a "$tmpdir/user/config.php" "$final_path/user" @@ -116,6 +118,7 @@ chown -R $app: $final_path ynh_app_setting_set $app unprotected_uris "/" + #================================================= # RELOAD NGINX #=================================================