From 6705e382484a1658cde6a973e4b4680ec1fc3cc0 Mon Sep 17 00:00:00 2001 From: Moul Date: Thu, 23 Jun 2016 11:12:33 +0000 Subject: [PATCH] [enh] scripts: use helpers. --- scripts/install | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 825552e..eea6b2f 100755 --- a/scripts/install +++ b/scripts/install @@ -19,10 +19,8 @@ version=$(cat ../conf/upstream_version) source /usr/share/yunohost/helpers # Check domain/path availability -sudo yunohost app checkurl $domain$path -a $app -if [[ ! $? -eq 0 ]]; then - exit 1 -fi +sudo yunohost app checkurl "${domain}${path}" -a "$app" \ + || ynh_die "Path not available: ${domain}${path}" # Check port availability sudo yunohost app checkport $port @@ -74,7 +72,7 @@ sudo $app start sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log # SSOwat Configuration -sudo yunohost app setting $app skipped_uris -v "/" +ynh_app_setting_set "$app" unprotected_uris "/" # Configure Nginx nginx_conf="../conf/nginx.conf"