From 14475a0da16846fd31641885027d0bb82bd4211c Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 1 Dec 2018 00:56:26 +0100 Subject: [PATCH] remove un needed helper --- scripts/install | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/scripts/install b/scripts/install index 6d6f451..0d02f39 100755 --- a/scripts/install +++ b/scripts/install @@ -30,18 +30,6 @@ path_url="/" port=10901 admin=$YNH_APP_ARG_ADMIN -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= - -# Normalize the url path syntax -path_url=$(ynh_normalize_url_path $path_url) - -# Check web path availability -ynh_webpath_available $domain $path_url -# Register (book) web path -ynh_webpath_register $app $domain $path_url - #================================================= # Check domain/path availability #================================================= @@ -49,15 +37,6 @@ ynh_webpath_register $app $domain $path_url yunohost app checkurl "${domain}${path_url}" -a "$app" \ || ynh_die "Path not available: ${domain}${path_url}" -#================================================= -# Check port availability -#================================================= - -yunohost app checkport $port -if [[ ! $? -eq 0 ]]; then - ynh_die "Port not available: ${port}" -fi - #================================================= # Check the admin exists in YunoHost users #================================================= @@ -65,10 +44,16 @@ fi ynh_user_exists $admin #================================================= -# Open port on firewall +# Check port availability #================================================= -yunohost firewall allow TCP $port > /dev/null 2>&1 +yunohost app checkport $port +if [[ ! $? -eq 0 ]]; then + ynh_die "Port not available: ${port}" +else + yunohost firewall allow TCP $port > /dev/null 2>&1 +fi + #================================================= # Get CPU architecture and check it