From cdf593c0b0f0045c28387b256b513b6890c47e30 Mon Sep 17 00:00:00 2001 From: Moul Date: Tue, 21 Feb 2017 14:51:22 +0100 Subject: [PATCH] [enh] fix errors reported by linter. --- scripts/install | 2 +- scripts/remove | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f1684fb..6b8ed06 100755 --- a/scripts/install +++ b/scripts/install @@ -24,7 +24,7 @@ sudo yunohost app checkurl "${domain}${path}" -a "$app" \ # Check port availability sudo yunohost app checkport $port if [[ ! $? -eq 0 ]]; then - exit 1 + ynh_die "Port not available: ${port}" fi # Check node availability diff --git a/scripts/remove b/scripts/remove index 1f2a1c4..22e4fff 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,5 +1,8 @@ #!/bin/bash +# Exit and treat unset variables as an error +set -u + # Source app helpers source /usr/share/yunohost/helpers