mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
Fixed install and upgrade script
This commit is contained in:
parent
25757fe7be
commit
641378c9e0
2 changed files with 7 additions and 1 deletions
|
@ -102,6 +102,9 @@ ynh_system_user_create $app
|
||||||
# Create a dedicated php-fpm config
|
# Create a dedicated php-fpm config
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
|
# copy index file
|
||||||
|
sudo cp ../conf/index.php $final_path/
|
||||||
|
|
||||||
|
|
||||||
# Change variable in yourls configuration
|
# Change variable in yourls configuration
|
||||||
sudo cp ../conf/config.php $final_path/user/config.php
|
sudo cp ../conf/config.php $final_path/user/config.php
|
||||||
|
|
|
@ -62,9 +62,10 @@ path_url=$(ynh_normalize_url_path $path_url)
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
# Create a temporary directory along with /user/plugin sub directory in it
|
# Create a temporary directory along with /user/plugin sub directory in it
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
mkdir -p "$tmpdir/user"
|
mkdir -p "$tmpdir/user/"
|
||||||
|
|
||||||
# Backup the app files in the temp dir
|
# 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/.htaccess" "$tmpdir"
|
||||||
sudo cp -a "$final_path/user/config.php" "$tmpdir/user"
|
sudo cp -a "$final_path/user/config.php" "$tmpdir/user"
|
||||||
|
|
||||||
|
@ -75,6 +76,7 @@ ynh_secure_remove "$final_path"
|
||||||
ynh_setup_source "$final_path"
|
ynh_setup_source "$final_path"
|
||||||
|
|
||||||
# Copy the app files from tmp to 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/.htaccess" "$final_path"
|
||||||
sudo cp -a "$tmpdir/user/config.php" "$final_path/user"
|
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 "/"
|
ynh_app_setting_set $app unprotected_uris "/"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue