diff --git a/conf/app.src b/conf/app.src index 59ec605..309f75c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/refs/tags/v21.04.6.tar.gz -SOURCE_SUM=2aa677448e5eb255e3045c1a4956873aea2216a50b4c8328ea6c107a5573486c +SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/refs/tags/v21.05.tar.gz +SOURCE_SUM=44f4fe9fab55e4d9c2711175da5d8c782e8431d766b53af9248ea7833173721c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index f575f57..75f8d8b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Platform to create documentation/wiki content", "fr": "Plateforme pour créer du contenu de documentation/wiki " }, - "version": "21.04.6~ynh1", + "version": "21.05.0~ynh1", "url": "https://www.bookstackapp.com/", "upstream": { "license": "MIT", diff --git a/scripts/install b/scripts/install index cb8e47c..4ffd131 100644 --- a/scripts/install +++ b/scripts/install @@ -74,6 +74,11 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +# Set permissions to app files +chmod 755 $final_path +chown -R $app:www-data $final_path +chmod -R o-rwx $final_path + #================================================= # NGINX CONFIGURATION #================================================= @@ -105,6 +110,7 @@ ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_ar mail_pwd=$(ynh_string_random --length=12) ynh_add_config --template=../conf/.env.example --destination=$final_path/.env +chmod 600 $final_path/.env #================================================= # FINAL BOOKSTACK INSTALL @@ -116,18 +122,6 @@ pushd $final_path php$phpversion artisan migrate --no-interaction --force popd -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod 755 $final_path -chown -R $app:www-data $final_path -chmod -R o-rwx $final_path -chmod 600 $final_path/.env - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 3c96378..6039fae 100644 --- a/scripts/restore +++ b/scripts/restore @@ -62,10 +62,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" -#================================================= -# RESTORE USER RIGHTS -#================================================= - # Restore permissions on app files chmod 755 $final_path chown -R $app:www-data $final_path diff --git a/scripts/upgrade b/scripts/upgrade index 21ac861..d2709ca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,6 +65,12 @@ then ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env" fi +# Set permissions on app files +chmod 755 $final_path +chown -R $app:www-data $final_path +chmod -R o-rwx $final_path +chmod 600 $final_path/.env + #================================================= # NGINX CONFIGURATION #================================================= @@ -100,18 +106,6 @@ pushd $final_path && php artisan view:clear --no-interaction popd -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -chmod 755 $final_path -chown -R $app:www-data $final_path -chmod -R o-rwx $final_path -chmod 600 $final_path/.env - #================================================= # RELOAD NGINX #=================================================