mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
parent
fdd21a59a8
commit
8e89d535e3
5 changed files with 43 additions and 15 deletions
|
@ -3,7 +3,8 @@
|
|||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="php7.3-curl php7.3-dom php7.3-gd php7.3-json php7.3-mbstring php7.3-pdo-mysql php7.3-tokenizer php7.3-zip"
|
||||
pkg_dependencies=""
|
||||
extra_pkg_dependencies="php7.3-curl php7.3-dom php7.3-gd php7.3-json php7.3-mbstring php7.3-pdo-mysql php7.3-tokenizer php7.3-zip"
|
||||
|
||||
# Version numbers
|
||||
php_version="7.3"
|
||||
|
|
|
@ -81,20 +81,23 @@ ynh_app_setting_set $app bazaar_extension $bazaar_extension
|
|||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
# INSTALL PHP
|
||||
#=================================================
|
||||
|
||||
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
||||
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
|
||||
else
|
||||
ynh_print_info --message="Installing php${php_version}..."
|
||||
ynh_install_php --phpversion="${php_version}" --package="$extra_pkg_dependencies"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --time --weight=1
|
||||
ynh_print_info --message="Installing dependencies..."
|
||||
|
||||
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
|
||||
### Those deb packages will be installed as dependencies of this package.
|
||||
### If you're not using this helper:
|
||||
### - Remove the section "REMOVE DEPENDENCIES" in the remove script
|
||||
### - Remove the variable "pkg_dependencies" in _common.sh
|
||||
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
||||
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
|
||||
|
||||
ynh_install_php --phpversion=${php_version} --package="$pkg_dependencies"
|
||||
ynh_install_app_dependencies "$pkg_dependencies"
|
||||
|
||||
#===================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
|
|
@ -41,7 +41,9 @@ ynh_script_progression --message="Removing dependencies..." --time --weight=1
|
|||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
ynh_remove_php
|
||||
if [ "$(lsb_release --codename --short)" != "buster" ]; then
|
||||
ynh_remove_php
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
|
|
|
@ -74,6 +74,17 @@ chown -R $app: $final_path
|
|||
chown -R $app:www-data $final_path/storage
|
||||
chmod -R 0775 $final_path
|
||||
|
||||
#=================================================
|
||||
# INSTALL PHP
|
||||
#=================================================
|
||||
|
||||
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
||||
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
|
||||
else
|
||||
ynh_print_info --message="Installing php${php_version}..."
|
||||
ynh_install_php --phpversion="${php_version}" --package="$extra_pkg_dependencies"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -88,7 +99,7 @@ ynh_restore_file --origin_path="/etc/php/${php_version}/fpm/pool.d/$app.conf"
|
|||
ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_php --phpversion=${php_version} --package="$pkg_dependencies"
|
||||
ynh_install_app_dependencies "$pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
|
|
|
@ -138,12 +138,23 @@ fi
|
|||
# Create a dedicated 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 php${php_version}..."
|
||||
ynh_install_php --phpversion="${php_version}" --package="$extra_pkg_dependencies"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
|
||||
ynh_print_info --message="Upgrading dependencies..."
|
||||
|
||||
ynh_install_php --phpversion=${php_version} --package="$pkg_dependencies"
|
||||
ynh_install_app_dependencies "$pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
|
Loading…
Add table
Reference in a new issue