mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Automagically run ynh_psql_if_first_run / regenconf upon postgresl install
This commit is contained in:
parent
4ccd718183
commit
b46a94a41d
2 changed files with 11 additions and 0 deletions
|
@ -261,6 +261,7 @@ ynh_install_app_dependencies() {
|
||||||
dependencies+=", php${specific_php_version}, php${specific_php_version}-fpm, php${specific_php_version}-common"
|
dependencies+=", php${specific_php_version}, php${specific_php_version}-fpm, php${specific_php_version}-common"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)"
|
||||||
|
|
||||||
# The first time we run ynh_install_app_dependencies, we will replace the
|
# The first time we run ynh_install_app_dependencies, we will replace the
|
||||||
# entire control file (This is in particular meant to cover the case of
|
# entire control file (This is in particular meant to cover the case of
|
||||||
|
@ -303,6 +304,14 @@ EOF
|
||||||
# Set the default php version back as the default version for php-cli.
|
# Set the default php version back as the default version for php-cli.
|
||||||
update-alternatives --set php /usr/bin/php$YNH_DEFAULT_PHP_VERSION
|
update-alternatives --set php /usr/bin/php$YNH_DEFAULT_PHP_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Trigger postgresql regenconf if we may have just installed postgresql
|
||||||
|
local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)"
|
||||||
|
if [[ "$psql_installed" != "$psql_installed2" ]]
|
||||||
|
then
|
||||||
|
yunohost tools regen-conf postgresql
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add dependencies to install with ynh_install_app_dependencies
|
# Add dependencies to install with ynh_install_app_dependencies
|
||||||
|
|
|
@ -281,6 +281,8 @@ ynh_psql_remove_db() {
|
||||||
|
|
||||||
# Create a master password and set up global settings
|
# Create a master password and set up global settings
|
||||||
#
|
#
|
||||||
|
# [internal]
|
||||||
|
#
|
||||||
# usage: ynh_psql_test_if_first_run
|
# usage: ynh_psql_test_if_first_run
|
||||||
#
|
#
|
||||||
# It also make sure that postgresql is installed and running
|
# It also make sure that postgresql is installed and running
|
||||||
|
|
Loading…
Add table
Reference in a new issue