From 1fbb65dcd2dbe31df41c5edb5ca2993eb5db7f1e Mon Sep 17 00:00:00 2001 From: src386 Date: Wed, 12 Aug 2015 14:35:47 +0200 Subject: [PATCH] add admin and password verifications --- README.md | 7 +++++-- scripts/install | 14 +++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 05a8b8f..23eaae6 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,16 @@ Movim for Yunohost. Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol : https://movim.eu . -PACKAGE NOT READY YET -DO NOT USE +Warning: BETA. Current Movim version : 20150810. **Changelog** +0.3b 2015-08-12 +- Check if admin exists +- Check if admin password is not empty + 0.2b 2015-08-12 - Add php5-cli as required - Fixed a warning for sysvinit script installation diff --git a/scripts/install b/scripts/install index c27a8d6..13c26fc 100644 --- a/scripts/install +++ b/scripts/install @@ -16,11 +16,23 @@ exit 1 fi # Check port availability -sudo yunohost app checkport $port; +sudo yunohost app checkport $port if [[ ! $? -eq 0 ]]; then exit 1 fi +# Check user availability +sudo yunohost user info $admin +if [[ ! $? -eq 0 ]]; then +exit 1 +fi + +# Check password not empty +if [[ -z "$password" ]]; then +printf("Error empty admin password, aborting"); +exit 1 +fi + sudo yunohost app setting movim admin -v $admin sudo yunohost app setting movim public_site -v $public_site sudo yunohost app setting movim port -v $port