Browse Source

Install/remove php only on stretch

pull/286/head
Kay0u 6 years ago
parent
commit
36f1485e87
No known key found for this signature in database GPG Key ID: AE1DCADB6415A156
  1. 6
      scripts/install
  2. 4
      scripts/remove
  3. 7
      scripts/restore
  4. 6
      scripts/upgrade

6
scripts/install

@ -56,9 +56,11 @@ ynh_app_setting_set --app=$app --key=user_home --value=$user_home
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=60
ynh_install_app_dependencies $pkg_dependencies
if [ "$(lsb_release --codename --short)" = "buster" ]; then
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
else
ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies"
fi
#=================================================
# CREATE A MYSQL DATABASE

4
scripts/remove

@ -30,6 +30,10 @@ ynh_script_progression --message="Removing dependencies..." --weight=20
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
if [ "$(lsb_release --codename --short)" = "stretch" ]; then
ynh_remove_php
fi
#=================================================
# REMOVE THE MYSQL DATABASE
#=================================================

7
scripts/restore

@ -93,10 +93,11 @@ ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf"
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=60
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
if [ "$(lsb_release --codename --short)" = "buster" ]; then
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
else
ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies"
fi
#=================================================
# RESTORE THE CRON FILE

6
scripts/upgrade

@ -137,9 +137,11 @@ path_url=$(ynh_normalize_url_path --path_url=$path_url)
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=7
ynh_install_app_dependencies $pkg_dependencies
if [ "$(lsb_release --codename --short)" = "buster" ]; then
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
else
ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies"
fi
#=================================================
# STANDARD UPGRADE STEPS

Loading…
Cancel
Save