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:
parent
9d69384201
commit
e3ce7bc238
5 changed files with 15 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
#pkg_dependencies="golang-go"
|
pkg_dependencies="postgresql postgresql-contrib"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -71,7 +71,11 @@ ynh_app_setting_set --app=$app --key=tls_port --value=$tls_port
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# 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
|
if ! command -v /usr/local/go/bin/go &> /dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Installing Go dependency... (this will take some time)" --time --weight=3
|
ynh_script_progression --message="Installing Go dependency... (this will take some time)" --time --weight=3
|
||||||
|
|
|
@ -53,10 +53,10 @@ ynh_psql_remove_db --db_user=$app --db_name=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEPENDENCIES
|
# 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
|
# Remove metapackage and its dependencies
|
||||||
#ynh_remove_app_dependencies
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
|
|
|
@ -81,7 +81,12 @@ chown -R $app:root /var/log/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# 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
|
if ! command -v /usr/local/go/bin/go &> /dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Installing Go dependency... (this will take some time)" --time --weight=3
|
ynh_script_progression --message="Installing Go dependency... (this will take some time)" --time --weight=3
|
||||||
|
|
|
@ -85,6 +85,9 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
# TODO: check Go version and upgrade if needed
|
# TODO: check Go version and upgrade if needed
|
||||||
if ! command -v /usr/local/go/bin/go &> /dev/null
|
if ! command -v /usr/local/go/bin/go &> /dev/null
|
||||||
|
|
Loading…
Add table
Reference in a new issue