mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
Adding double quote for the -z
This commit is contained in:
parent
d8a5ceb9eb
commit
264ba6a48e
1 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@ elif [ "$is_public" = "No" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If domain doesn't exist, retrieve it
|
# If domain doesn't exist, retrieve it
|
||||||
if [ -z $domain ]; then
|
if [ -z "$domain" ]; then
|
||||||
domain=$(grep "external_url" "/etc/gitlab/gitlab.rb" | cut -d'/' -f3) # retrieve $domain from conf file
|
domain=$(grep "external_url" "/etc/gitlab/gitlab.rb" | cut -d'/' -f3) # retrieve $domain from conf file
|
||||||
if [ ${domain: -1} == "'" ]; then # if the last char of $domain is ' remove it
|
if [ ${domain: -1} == "'" ]; then # if the last char of $domain is ' remove it
|
||||||
domain=${domain:0:-1}
|
domain=${domain:0:-1}
|
||||||
|
@ -49,20 +49,20 @@ if [ -z $domain ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If path_url doesn't exist, retrieve it
|
# If path_url doesn't exist, retrieve it
|
||||||
if [ -z $path_url ]; then
|
if [ -z "$path_url" ]; then
|
||||||
path_url=$(grep "location" "/etc/nginx/conf.d/${domain}.d/gitlab.conf" | cut -d' ' -f2)
|
path_url=$(grep "location" "/etc/nginx/conf.d/${domain}.d/gitlab.conf" | cut -d' ' -f2)
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
path_url=$(ynh_normalize_url_path $path_url)
|
||||||
ynh_app_setting_set $app path_url path_url
|
ynh_app_setting_set $app path_url path_url
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If port doesn't exist, retrieve it
|
# If port doesn't exist, retrieve it
|
||||||
if [ -z $port ]; then
|
if [ -z "$port" ]; then
|
||||||
port=$(grep -F "nginx['listen_port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3)
|
port=$(grep -F "nginx['listen_port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3)
|
||||||
ynh_app_setting_set $app web_port $port
|
ynh_app_setting_set $app web_port $port
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If port doesn't exist, retrieve it
|
# If port doesn't exist, retrieve it
|
||||||
if [ -z $portUnicorn ]; then
|
if [ -z "$portUnicorn" ]; then
|
||||||
portUnicorn=$(grep -F "unicorn['port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3)
|
portUnicorn=$(grep -F "unicorn['port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3)
|
||||||
ynh_app_setting_set $app unicorn_port $portUnicorn
|
ynh_app_setting_set $app unicorn_port $portUnicorn
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue