mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Merge pull request #101 from YunoHost-Apps/fix-install-for-buster
[wip] Fix install for buster
This commit is contained in:
commit
98f8daad22
6 changed files with 35 additions and 32 deletions
|
@ -11,9 +11,9 @@
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
# 0.10.6
|
# 0.10.6
|
||||||
upgrade=1 from_commit=605a47aac7553fdcc6012531ee67add8dbe37b97
|
# upgrade=1 from_commit=605a47aac7553fdcc6012531ee67add8dbe37b97
|
||||||
# 0.10.7
|
# 0.10.7
|
||||||
upgrade=1 from_commit=7fa86c3e6e6db6668be0a165213d554850b9fce8
|
# upgrade=1 from_commit=7fa86c3e6e6db6668be0a165213d554850b9fce8
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
|
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="postgresql redis-server \
|
pkg_dependencies="postgresql redis-server \
|
||||||
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 libwebp6 \
|
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4|libvpx5 libmagickwand-6.q16-3|libmagickwand-6.q16-6 libwebp6 \
|
||||||
pngquant jpegoptim gifsicle"
|
pngquant jpegoptim gifsicle"
|
||||||
|
|
||||||
extra_pkg_dependencies="php7.3-bcmath php7.3-cli php7.3-curl php7.3-exif php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-pgsql php7.3-simplexml php7.3-xml php7.3-zip php7.3-intl"
|
extra_pkg_dependencies="php7.3-bcmath php7.3-cli php7.3-curl php7.3-exif php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-pgsql php7.3-simplexml php7.3-xml php7.3-zip php7.3-intl"
|
||||||
|
|
|
@ -56,6 +56,17 @@ ynh_app_setting_set --app="$app" --key=app_key --value="$app_key"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
#=================================================
|
||||||
|
# INSTALL PHP7.3
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
||||||
|
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
|
||||||
|
else
|
||||||
|
ynh_print_info --message="Installing php7.3..."
|
||||||
|
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -63,13 +74,6 @@ ynh_print_info --message="Installing dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies "$pkg_dependencies"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# INSTALL PHP
|
|
||||||
#=================================================
|
|
||||||
ynh_print_info --message="Installing php..."
|
|
||||||
|
|
||||||
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A POSTGRESQL DATABASE
|
# CREATE A POSTGRESQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -128,11 +132,6 @@ chown -R "$app": "$final_path"
|
||||||
|
|
||||||
ynh_install_composer --phpversion="7.3" --workdir="$final_path"
|
ynh_install_composer --phpversion="7.3" --workdir="$final_path"
|
||||||
|
|
||||||
# Fix Google Recaptcha removal
|
|
||||||
ynh_secure_remove --file="$final_path/bootstrap/cache"
|
|
||||||
mkdir -p "$final_path/bootstrap/cache"
|
|
||||||
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -58,7 +58,9 @@ ynh_print_info --message="Removing dependencies..."
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_app_dependencies
|
ynh_remove_app_dependencies
|
||||||
ynh_remove_php
|
if [ "$(lsb_release --codename --short)" != "buster" ]; then
|
||||||
|
ynh_remove_php
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
|
|
|
@ -77,11 +77,15 @@ ynh_print_info --message="Restoring user rights..."
|
||||||
chown -R "$app": "$final_path"
|
chown -R "$app": "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL PHP
|
# INSTALL PHP7.3
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Installing php..."
|
|
||||||
|
|
||||||
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
||||||
|
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
|
||||||
|
else
|
||||||
|
ynh_print_info --message="Installing php7.3..."
|
||||||
|
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
|
|
@ -113,6 +113,17 @@ ynh_print_info --message="Upgrading nginx web server configuration..."
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE PHP7.3
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
||||||
|
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
|
||||||
|
else
|
||||||
|
ynh_print_info --message="Upgrading php7.3..."
|
||||||
|
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -120,14 +131,6 @@ ynh_print_info --message="Upgrading dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies "$pkg_dependencies"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE PHP
|
|
||||||
#=================================================
|
|
||||||
ynh_print_info --message="Upgrading php..."
|
|
||||||
|
|
||||||
ynh_remove_php
|
|
||||||
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -153,11 +156,6 @@ ynh_print_info --message="Updating php dependencies..."
|
||||||
|
|
||||||
chown -R "$app": "$final_path"
|
chown -R "$app": "$final_path"
|
||||||
|
|
||||||
# Fix Google Recaptcha removal
|
|
||||||
ynh_secure_remove --file="$final_path/bootstrap/cache"
|
|
||||||
mkdir -p "$final_path/bootstrap/cache"
|
|
||||||
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload"
|
|
||||||
|
|
||||||
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="update"
|
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="update"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue