diff --git a/.pct-helpers b/.pct-helpers index 17deb18..c0b2918 100644 --- a/.pct-helpers +++ b/.pct-helpers @@ -119,7 +119,9 @@ fillsection(){ ( ct2hostname(){ local ct=${CT_DIR}/${1}.conf - local host=$(cat $ct | grep hostname | head -1) + local host=$(cat $ct \ + | grep -e '^\s*hostname:' \ + | head -1) echo ${host/hostname: /} } diff --git a/gitea/make.sh b/gitea/make.sh index 36cff13..e8e8af3 100755 --- a/gitea/make.sh +++ b/gitea/make.sh @@ -78,6 +78,9 @@ pctSetNotes $ID saveLastRunConfig +echo "# Traefik config..." +traefikPushConfig + showNotes echo "# Done." diff --git a/host/make.sh b/host/make.sh index 25a73df..1fda86d 100755 --- a/host/make.sh +++ b/host/make.sh @@ -106,6 +106,9 @@ echo "# Building config..." buildAssets +# XXX /etc/hosts??? + + # DNS if xreadYes "# Update DNS?" DNS ; then file=/etc/resolv.conf diff --git a/make-shares b/make-shares index bd9147a..03e95f3 100755 --- a/make-shares +++ b/make-shares @@ -23,8 +23,7 @@ fi for ct in $CT_DIR/*.conf ; do id=$(basename ${ct/.conf/}) - # XXX this seems to break on 302... - host=$(cat $ct | grep hostname | head -1) + host=$(ct2hostname $id) host=${host/hostname: /} # skip templates... diff --git a/nextcloud/make.sh b/nextcloud/make.sh index 00af37a..8274ebc 100755 --- a/nextcloud/make.sh +++ b/nextcloud/make.sh @@ -141,6 +141,9 @@ pctSetNotes $ID saveLastRunConfig +echo "# Traefik config..." +traefikPushConfig + showNotes echo "# Done." diff --git a/ssh/make.sh b/ssh/make.sh index d831834..b7fd89b 100755 --- a/ssh/make.sh +++ b/ssh/make.sh @@ -95,6 +95,7 @@ pctSetNotes $ID saveLastRunConfig +echo "# Traefik config..." traefikPushConfig showNotes diff --git a/wireguard/make.sh b/wireguard/make.sh index abe3a2f..2ed13c9 100755 --- a/wireguard/make.sh +++ b/wireguard/make.sh @@ -105,6 +105,9 @@ pctSetNotes $ID saveLastRunConfig +echo "# Traefik config..." +traefikPushConfig + showNotes echo "# Done."