mirror of
https://github.com/linuxserver/docker-bookstack.git
synced 2026-02-20 02:30:30 +08:00
Update root/etc/cont-init.d/50-config
Avoid grep -E, change to regex Co-authored-by: Eric Nemchik <eric@nemchik.com>
This commit is contained in:
parent
8cb08dab14
commit
987b111e04
@ -58,7 +58,7 @@ fi
|
||||
|
||||
# if DB_HOST contains a port and DB_HOST is not a IPv6 without brackets [..]
|
||||
# support ipv4:port, [ipv6]:port, and domain:port
|
||||
if echo "$DB_HOST" | grep -qE ':[0-9]+$' && ! echo "$DB_HOST" | grep -qE '^(:{0,2}[a-fA-F0-9]{1,4})+$'; then
|
||||
if [[ ${DB_HOST} =~ :[0-9]+$ ]] && ! [[ ${DB_HOST} =~ ^(:{0,2}[a-fA-F0-9]{1,4})+$ ]]; then
|
||||
DB_HOST_PORT="${DB_HOST}"
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user