summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
Diffstat (limited to 'frontends')
-rw-r--r--frontends/scripts/gemtexter.sh.tpl25
1 files changed, 25 insertions, 0 deletions
diff --git a/frontends/scripts/gemtexter.sh.tpl b/frontends/scripts/gemtexter.sh.tpl
index 47a6a0d..4fc76d9 100644
--- a/frontends/scripts/gemtexter.sh.tpl
+++ b/frontends/scripts/gemtexter.sh.tpl
@@ -15,6 +15,10 @@ function ensure_site {
fi
cd $parent
+ if [ ! -e www.$basename ]; then
+ ln -s $basename www.$basename
+ fi
+
if [ ! -d $basename ]; then
git clone $repo -b $branch --single-branch $basename
else
@@ -23,6 +27,23 @@ function ensure_site {
fi
}
+function ensure_links {
+ dir=$1
+ target=$2
+
+ basename=$(basename $dir)
+ parent=$(dirname $dir)
+
+ cd $parent
+ if [ ! -e $target ]; then
+ ln -s $basename $target
+ fi
+
+ if [ ! -e www.$target ]; then
+ ln -s $basename www.$target
+ fi
+}
+
<% if ($is_primary->($vio0_ip)) { %>
for site in foo.zone snonux.land paul.cyou; do
ensure_site \
@@ -34,4 +55,8 @@ for site in foo.zone snonux.land paul.cyou; do
https://codeberg.org/snonux/$site \
content-html
done
+
+ensure_links /var/gemini/paul.cyou buetow.org
+ensure_links /var/gemini/paul.cyou paul.buetow.org
<% } %>
+