From 8493cc60e1f44a8fabb67ab03a2f076d97757ccf Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 14 Mar 2019 01:04:59 +0100 Subject: [PATCH] Update to last example_ynh --- scripts/_common.sh | 7 +++++++ scripts/install | 8 +++----- scripts/restore | 3 +-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b905339..000bced 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,12 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +# dependencies used by the app +pkg_dependencies="mongodb mongodb-server" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 32199e9..4ab5fe7 100755 --- a/scripts/install +++ b/scripts/install @@ -99,19 +99,17 @@ ynh_print_info "Installing dependencies..." ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -ynh_print_info "Installing nodejs ..." ynh_install_nodejs 8.15.1 ynh_use_nodejs -ynh_print_info "Installing mongodb dependencies ..." -ynh_install_app_dependencies "mongodb mongodb-server" +ynh_install_app_dependencies $pkg_dependencies #================================================= -# Start MONGODB +# START MONGODB #================================================= +ynh_print_info "Starting mongodb ..." # Start mogodb -ynh_print_info "Starting mongodb ..." systemctl enable mongodb systemctl restart mongodb diff --git a/scripts/restore b/scripts/restore index 67f0303..6998671 100644 --- a/scripts/restore +++ b/scripts/restore @@ -88,8 +88,7 @@ ynh_print_info "Reinstalling dependencies..." ynh_install_nodejs 8.15.1 ynh_use_nodejs -# Install mongodb -ynh_install_app_dependencies "mongodb mongodb-server" +ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE MONGODB DATABASE