From fe9e1e1b7016aca47842eb9a27b73d242e1d56c4 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Feb 2024 00:50:51 +0300 Subject: [PATCH 1/4] bugfix... Signed-off-by: Alex A. Naanou --- .pct-helpers | 4 +++- host/make.sh | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) 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/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 From 7bd6e197ab2f1019e1b554655dada6cd171aa00b Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Feb 2024 01:46:39 +0300 Subject: [PATCH 2/4] fix... Signed-off-by: Alex A. Naanou --- make-shares | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-shares b/make-shares index 84321dd..7360397 100755 --- a/make-shares +++ b/make-shares @@ -23,7 +23,7 @@ fi for ct in $CT_DIR/*.conf ; do id=$(basename ${ct/.conf/}) - host=$(cat $ct | grep hostname | head -1) + host=$(ct2hostname) host=${host/hostname: /} # skip templates... From df20f1662c133ccf1877acca5638bac7d7991c79 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Feb 2024 01:50:22 +0300 Subject: [PATCH 3/4] fix... Signed-off-by: Alex A. Naanou --- make-shares | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-shares b/make-shares index 7360397..03e95f3 100755 --- a/make-shares +++ b/make-shares @@ -23,7 +23,7 @@ fi for ct in $CT_DIR/*.conf ; do id=$(basename ${ct/.conf/}) - host=$(ct2hostname) + host=$(ct2hostname $id) host=${host/hostname: /} # skip templates... From 637786b9fc7e905129af8cdb6f53f1ca4109e25a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Feb 2024 02:04:35 +0300 Subject: [PATCH 4/4] now pushing traefik config.... Signed-off-by: Alex A. Naanou --- gitea/make.sh | 3 +++ nextcloud/make.sh | 3 +++ ssh/make.sh | 1 + wireguard/make.sh | 3 +++ 4 files changed, 10 insertions(+) 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/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."