From c0770374f0eecf668ac37e60502e40176626f580 Mon Sep 17 00:00:00 2001 From: kay0u Date: Sat, 13 Jul 2019 14:39:42 +0200 Subject: [PATCH] Install dependencies --- scripts/_common.sh | 7 +++++++ scripts/install | 7 +++++++ scripts/restore | 7 +++++++ scripts/upgrade | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 0a018dc..93323b9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,12 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +# dependencies used by the app +pkg_dependencies="php-xml php-mbstring php-mysql" + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index aad55d3..083dfcf 100644 --- a/scripts/install +++ b/scripts/install @@ -53,6 +53,13 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= # STANDARD MODIFICATIONS +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --time --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE A MYSQL DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index ea0a26f..3c43c5f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -46,6 +46,13 @@ fi #================================================= # STANDARD RESTORATION STEPS +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4d510df..5e55e3f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,6 +87,13 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #=================================================