mirror of
https://github.com/YunoHost-Apps/bookstack_ynh.git
synced 2024-09-03 18:16:02 +02:00
Update upgrade
This commit is contained in:
parent
482d6572fb
commit
d94f2b6816
1 changed files with 20 additions and 18 deletions
|
@ -61,30 +61,26 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Create a temporary directory
|
# # Create a temporary directory
|
||||||
tmpdir="$(mktemp -d)"
|
# tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
# Backup the config file in the temp dir
|
# # Backup the config file in the temp dir
|
||||||
cp -a "$final_path/.env" "$tmpdir/.env"
|
# cp -a "$final_path/.env" "$tmpdir/.env"
|
||||||
|
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
#ynh_secure_remove --file="$final_path"
|
#ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env"
|
||||||
|
|
||||||
# Copy the admin saved settings from tmp directory to final path
|
# # Copy the admin saved settings from tmp directory to final path
|
||||||
cp -a "$tmpdir/.env" "$final_path/.env"
|
# cp -a "$tmpdir/.env" "$final_path/.env"
|
||||||
|
|
||||||
# Remove the tmp directory securely
|
# # Remove the tmp directory securely
|
||||||
ynh_secure_remove --file="$tmpdir"
|
# ynh_secure_remove --file="$tmpdir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set permissions on app files
|
|
||||||
chmod 755 $final_path
|
|
||||||
chmod -R o-rwx $final_path
|
|
||||||
chown -R $app:www-data $final_path
|
|
||||||
chmod 600 $final_path/.env
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -108,7 +104,7 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
ynh_script_progression --message="Installing BookStack with Composer..." --weight=5
|
ynh_script_progression --message="Installing BookStack with Composer..." --weight=5
|
||||||
|
|
||||||
# Install composer
|
# Install composer
|
||||||
ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--no-dev"
|
ynh_install_composer #--phpversion=$phpversion --workdir=$final_path --install_args="--no-dev"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FINAL BOOKSTACK INSTALL
|
# FINAL BOOKSTACK INSTALL
|
||||||
|
@ -116,11 +112,17 @@ ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_ar
|
||||||
ynh_script_progression --message="Install BookStack" --weight=5
|
ynh_script_progression --message="Install BookStack" --weight=5
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
php$phpversion artisan migrate --no-interaction \
|
php$phpversion artisan migrate --no-interaction
|
||||||
&& php$phpversion artisan cache:clear --no-interaction \
|
php$phpversion artisan cache:clear --no-interaction
|
||||||
&& php$phpversion artisan view:clear --no-interaction
|
php$phpversion artisan view:clear --no-interaction
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# Set permissions on app files
|
||||||
|
chmod 755 $final_path
|
||||||
|
chmod -R o-rwx $final_path
|
||||||
|
chown -R $app:www-data $final_path
|
||||||
|
chmod 600 $final_path/.env
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue