diff --git a/conf/abantecart-deps.control b/conf/abantecart-deps.control new file mode 100644 index 0000000..015d819 --- /dev/null +++ b/conf/abantecart-deps.control @@ -0,0 +1,14 @@ +Section: misc +Priority: optional +Homepage: http://www.abantecart.com/ +Standards-Version: 1.2.9 + +Package: cops-deps +Version: 1.2-1 +Depends: php5-mysql +Architecture: all +Description: meta package for abantecart dependencies + The Most Powerful eCommerce Platform to Sell anything. + . + . + This meta-package is only responsible of installing its dependencies. diff --git a/scripts/install b/scripts/install index 62ded26..c03831d 100644 --- a/scripts/install +++ b/scripts/install @@ -28,8 +28,12 @@ CHECK_DOMAINPATH # Vérifie la disponibilité du path et du domaine. CHECK_FINALPATH # Vérifie que le dossier de destination n'est pas déjà utilisé. # Install dependency to convert tracks to a readable format for the browser -sudo apt-get update -sudo apt-get -y -qq install php5-mysql +# sudo apt-get update +# sudo apt-get -y -qq install php5-mysql + +# Install dependencies using Helpers +ynh_package_install_from_equivs ../conf/abantecart-deps.control \ +|| ynh_die "Unable to install dependencies" # Check password strength [[ ${#passwd} -gt 5 ]] || ynh_die \ diff --git a/scripts/remove b/scripts/remove index 787d2e8..b9c973a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,4 +12,10 @@ ynh_mysql_drop_db $app sudo rm -rf /var/www/$app sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf +# Remove app dependencies +if ynh_package_is_installed "abantecart-deps"; then + ynh_package_autoremove "abantecart-deps" +fi + + sudo service nginx reload