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 #=================================================