From 7b2e320b004b21d3ac339a25e2e13a22b3df40d8 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 23 Sep 2017 10:25:23 +0200 Subject: [PATCH] Add php5-gd dependency --- scripts/_common.sh | 2 ++ scripts/install | 4 ++++ scripts/remove | 5 +++++ scripts/upgrade | 6 ++++++ 4 files changed, 17 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index beef539..2a3b1f5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,6 +3,8 @@ # Common variables # +pkg_dependencies="php5-gd" + # ============= FUTURE YUNOHOST HELPERS ============= # Create a dedicated fail2ban config (jail and filter conf files) diff --git a/scripts/install b/scripts/install index e9147cc..f78b839 100644 --- a/scripts/install +++ b/scripts/install @@ -63,6 +63,10 @@ ynh_app_setting_set $app language "$language" #================================================= # STANDARD MODIFICATIONS #================================================= +# INSTALL DEPENDENCIES +#================================================= + +ynh_install_app_dependencies "$pkg_dependencies" #================================================= # CREATE A MYSQL DB diff --git a/scripts/remove b/scripts/remove index 0a3954f..b9cb134 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,6 +22,11 @@ domain=$(ynh_app_setting_get "$app" domain) #================================================= # STANDARD REMOVE #================================================= +# REMOVE DEPENDENCIES +#================================================= + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies #================================================= # REMOVE THE MYSQL DB diff --git a/scripts/upgrade b/scripts/upgrade index 3e72842..5617f48 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,6 +94,12 @@ if [ -f "/etc/yunohost/apps/$app/scripts/backup" ] ; then ynh_abort_if_errors # Stop script if an error is detected fi +#================================================= +# INSTALL DEPENDENCIES +#================================================= + +ynh_install_app_dependencies "$pkg_dependencies" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================