From 36f5048d3e93d09b0f03283770c4df60ac465ac0 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sun, 6 Jan 2019 13:10:03 +0100 Subject: [PATCH 1/2] Update install --- scripts/install | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 3df0d79..a599ab0 100644 --- a/scripts/install +++ b/scripts/install @@ -151,7 +151,7 @@ cat $final_path/config.json chown -R $app:$app $final_path pushd $final_path -exec_as "$app" ./nodebb setup -l +exec_as "$app" ./nodebb setup -l > $install_log exec_as "$app" ./nodebb build -l popd @@ -197,3 +197,18 @@ ynh_check_starting "NodeBB is now listening on: 0.0.0.0:4567" "/var/log/syslog" #================================================= systemctl reload nginx + +#================================================= +# SEND A README FOR THE ADMIN +#================================================= + +mail_content=$(cat $install_log | grep '\(Username\|Password\)')* + +message=" $app was successfully installed :) +Please open your $app domain: https://$domain$path_url + +$mail_content + +If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/nodebb_ynh" + +ynh_send_readme_to_admin "$message" From 0aece4715e9827a4a082f6ffaa66c34e92993ab7 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sun, 6 Jan 2019 13:13:51 +0100 Subject: [PATCH 2/2] Update remove --- scripts/remove | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/remove b/scripts/remove index 93137de..24ff799 100644 --- a/scripts/remove +++ b/scripts/remove @@ -46,10 +46,7 @@ fi #================================================= mongo --shell "$dbname" --eval 'db.dropUser("'${dbuser}'", {w: "majority", wtimeout: 5000})' <<< exit -#mongo -u $dbuser -p$dbpass --authenticationDatabase $dbname --shell "$dbname" --eval 'db.dropUser('dbuser');' <<< exit mongo --shell "$dbname" --eval 'db.runCommand({dropDatabase: 1})' <<< exit -#mongo -u $dbuser -p$dbpass --authenticationDatabase $dbname --shell "$dbname" --eval 'db.dropDatabase();' <<< exit - #================================================= # REMOVE DEPENDENCIES @@ -72,13 +69,6 @@ ynh_secure_remove "$final_path" # Remove the dedicated nginx config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= - -# Remove the dedicated php-fpm config -#ynh_remove_fpm_config - #================================================= # REMOVE LOGROTATE CONFIGURATION #=================================================