From 34ae5082fad1b9e0128fdfa68bee0348471d7c0d Mon Sep 17 00:00:00 2001 From: Moul Date: Wed, 3 Feb 2016 16:41:20 +0100 Subject: [PATCH] Add port availability checking. --- scripts/install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index 9ef815e..c4e7361 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,12 @@ if [[ ! $? -eq 0 ]]; then exit 1 fi +# Check port availability +sudo yunohost app checkport 8081 +if [[ ! $? -eq 0 ]]; then + exit 1 +fi + # Copy files to the right place final_path=/var/www/$app sudo mkdir -p $final_path