1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dendrite_ynh.git synced 2024-09-03 18:25:58 +02:00

Add psql dependency

This commit is contained in:
tituspijean 2021-01-17 17:04:29 +01:00
parent 9d69384201
commit e3ce7bc238
5 changed files with 15 additions and 3 deletions

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
#pkg_dependencies="golang-go"
pkg_dependencies="postgresql postgresql-contrib"
#=================================================
# PERSONAL HELPERS

View file

@ -71,7 +71,11 @@ ynh_app_setting_set --app=$app --key=tls_port --value=$tls_port
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
# Install Go if needed
if ! command -v /usr/local/go/bin/go &> /dev/null
then
ynh_script_progression --message="Installing Go dependency... (this will take some time)" --time --weight=3

View file

@ -53,10 +53,10 @@ ynh_psql_remove_db --db_user=$app --db_name=$app
#=================================================
# REMOVE DEPENDENCIES
#=================================================
#ynh_script_progression --message="Removing dependencies..." --time --weight=1
ynh_script_progression --message="Removing dependencies..." --time --weight=1
# Remove metapackage and its dependencies
#ynh_remove_app_dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR

View file

@ -81,7 +81,12 @@ chown -R $app:root /var/log/$app
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
# Install Go if needed
if ! command -v /usr/local/go/bin/go &> /dev/null
then
ynh_script_progression --message="Installing Go dependency... (this will take some time)" --time --weight=3

View file

@ -85,6 +85,9 @@ ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=1
ynh_install_app_dependencies "$pkg_dependencies"
# TODO: check Go version and upgrade if needed
if ! command -v /usr/local/go/bin/go &> /dev/null