mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
Use of ynh_package_install_from_equivs
This commit is contained in:
parent
66a050ab6c
commit
3b4b90540d
5 changed files with 39 additions and 4 deletions
16
conf/z-push-deps.control
Normal file
16
conf/z-push-deps.control
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Section: misc
|
||||||
|
Priority: optional
|
||||||
|
Homepage: http://z-push.org/
|
||||||
|
Standards-Version: 2.3.4
|
||||||
|
|
||||||
|
Package: z-push-deps
|
||||||
|
Version: 1.2-1
|
||||||
|
Depends: php-soap, php5-imap, libawl-php, php5-xsl
|
||||||
|
Architecture: all
|
||||||
|
Description: meta package for z-push dependencies
|
||||||
|
Z-Push is an open-source application to synchronize
|
||||||
|
ActiveSync compatible devices such as mobile phones,
|
||||||
|
tablets and Outlook 2013 and above.
|
||||||
|
.
|
||||||
|
.
|
||||||
|
This meta-package is only responsible of installing its dependencies.
|
|
@ -65,7 +65,12 @@ CHECK_DOMAINPATH () { # Vérifie la disponibilité du path et du domaine.
|
||||||
CHECK_DOMAINPATH
|
CHECK_DOMAINPATH
|
||||||
|
|
||||||
# Prereqs
|
# Prereqs
|
||||||
sudo apt-get install php-soap php5-imap libawl-php php5-xsl -y
|
#sudo apt-get install php-soap php5-imap libawl-php php5-xsl -y
|
||||||
|
|
||||||
|
# Install dependencies using Helpers
|
||||||
|
ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \
|
||||||
|
|| ynh_die "Unable to install dependencies"
|
||||||
|
|
||||||
|
|
||||||
final_path="/var/www/$app"
|
final_path="/var/www/$app"
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@ sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
||||||
sudo rm -f /etc/logrotate.d/$app
|
sudo rm -f /etc/logrotate.d/$app
|
||||||
|
|
||||||
|
# Remove app dependencies
|
||||||
|
if ynh_package_is_installed "$DEPS_PKG_NAME"; then
|
||||||
|
ynh_package_autoremove "$DEPS_PKG_NAME"
|
||||||
|
fi
|
||||||
|
|
||||||
# Restart of services
|
# Restart of services
|
||||||
sudo service php5-fpm reload
|
sudo service php5-fpm reload
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
|
|
@ -15,8 +15,13 @@ final_nginxconf=$(ynh_app_setting_get $app final_nginxconf)
|
||||||
final_phpconf=$(ynh_app_setting_get $app final_phpconf)
|
final_phpconf=$(ynh_app_setting_get $app final_phpconf)
|
||||||
|
|
||||||
# Prereqs
|
# Prereqs
|
||||||
sudo apt-get update -y
|
#sudo apt-get update -y
|
||||||
sudo apt-get install php-soap php5-imap libawl-php php5-xsl
|
#sudo apt-get install php-soap php5-imap libawl-php php5-xsl
|
||||||
|
# Install dependencies using Helpers
|
||||||
|
ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \
|
||||||
|
|| ynh_die "Unable to install dependencies"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Restore sources, data and permissions
|
# Restore sources, data and permissions
|
||||||
sudo mkdir -p $final_path
|
sudo mkdir -p $final_path
|
||||||
|
|
|
@ -56,7 +56,11 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# Prereqs
|
# Prereqs
|
||||||
sudo apt-get install php-soap php5-imap libawl-php php5-xsl
|
#sudo apt-get install php-soap php5-imap libawl-php php5-xsl
|
||||||
|
# Install dependencies using Helpers
|
||||||
|
ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \
|
||||||
|
|| ynh_die "Unable to install dependencies"
|
||||||
|
|
||||||
|
|
||||||
# Cleaning
|
# Cleaning
|
||||||
sudo rm -rf $final_path
|
sudo rm -rf $final_path
|
||||||
|
|
Loading…
Add table
Reference in a new issue