mirror of
https://github.com/hectorm/hblock.git
synced 2026-04-21 22:46:32 +05:30
Use $HOSTNAME if is defined
This commit is contained in:
parent
c1a7ed55f4
commit
d7fe4ec39f
2 changed files with 3 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ build:
|
|||
stage: build
|
||||
script:
|
||||
- apk add --no-cache curl file gawk grep libidn make sed zip
|
||||
- make build stats index
|
||||
- HOSTNAME= make build stats index
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
|
|
|
|||
7
hblock
7
hblock
|
|
@ -16,11 +16,8 @@ backupDir=''
|
|||
lenient=false
|
||||
ignoreDownloadError=false
|
||||
|
||||
hostname=$(uname -n)
|
||||
# Prevent adding 'localhost' twice
|
||||
hostname=$(printf -- '%s' "$hostname" | sed '/^localhost$/d')
|
||||
# Prevent adding GitLab CI runner hostname
|
||||
hostname=$(printf -- '%s' "$hostname" | sed '/^runner-[[:alnum:]]\{8\}-project-.*$/d')
|
||||
# shellcheck disable=SC2039
|
||||
hostname=${HOSTNAME-$(uname -n)}
|
||||
|
||||
# Default header block
|
||||
header=$(cat <<-EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue