From 751068228d61dedd2c040544cdc957431d089b71 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 31 Jan 2020 18:27:51 +0700 Subject: [PATCH] Install php-sqlite3 --- scripts/_common.sh | 10 ++++++++++ scripts/install | 7 +++++++ scripts/remove | 7 +++++++ scripts/restore | 7 +++++++ scripts/upgrade | 7 +++++++ 5 files changed, 38 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 8e98c09..516c436 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,15 @@ #!/bin/bash +#================================================= +# SET ALL CONSTANTS +#================================================= + +pkg_dependencies="php-sqlite3" + +#================================================= +# EXPERIMENTAL HELPERS +#================================================= + # Send an email to inform the administrator # # usage: ynh_send_readme_to_admin --app_message=app_message [--recipients=recipients] [--type=type] diff --git a/scripts/install b/scripts/install index ee466b8..cf0c85c 100644 --- a/scripts/install +++ b/scripts/install @@ -69,6 +69,13 @@ ynh_app_setting_set $app db_name $db_name ynh_mysql_setup_db $db_name $db_name db_pwd=$(ynh_app_setting_get $app mysqlpwd) +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_print_info --message="Installing dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/remove b/scripts/remove index 1f589fb..b931f7a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,6 +31,13 @@ ynh_print_info "Stopping and removing the systemd service" # Remove the dedicated systemd config ynh_remove_systemd_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_print_info --message="Removing dependencies" + +ynh_remove_app_dependencies + #================================================= # REMOVE THE MYSQL DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index 4e7aaa6..b4e51bf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -51,6 +51,13 @@ test ! -d $final_path \ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_print_info --message="Reinstalling dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE APP MAIN DIR #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e91b2d4..420c53f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -111,6 +111,13 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # STANDARD UPGRADE STEPS +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_print_info --message="Installing dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================