Skip to content

Commit 412b5d7

Browse files
Merge pull request #571 from appdevforall/feat/K2GO-409-bake-help-manual-rootfs
K2GO-409 feat(help): deploy the manual into the rootfs so the box serves /k2go-docs/
2 parents ac0cf6c + 67bcc0e commit 412b5d7

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

‎iiab-android‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -675,16 +675,24 @@ else
675675
fi
676676

677677
#-----------------------------
678-
# K2Go docs (tier-3) static module — infrastructure only.
679-
# Install the nginx conf + create the served dir. Documentation content is
680-
# dropped into /library/www/html/k2go-docs later (cp); an empty dir returns 404
681-
# so the portal index hides the module until real content exists.
678+
# K2Go docs (tier-3) static module.
679+
# Install the nginx conf, then deploy the committed manual (static/k2go-docs/content) into the
680+
# served dir. An empty dir returns 404, so the portal index hides the module until content exists;
681+
# with the manual present the box serves it at /k2go-docs/ and the module appears (K2GO-409).
682682
#-----------------------------
683-
log "Installing K2Go docs (tier-3) static module scaffold..."
683+
log "Installing K2Go docs (tier-3) static module..."
684684
cp "${K2GO_OPT_DIR}/static/k2go-docs/k2go-docs-nginx.conf" "/etc/nginx/conf.d/k2go-docs-nginx.conf"
685685
mkdir -p /library/www/html/k2go-docs
686+
# Clean teardown before redeploy so a removed page leaves no stale file (same pattern as pdf.js).
687+
rm -rf /library/www/html/k2go-docs/*
688+
if [ -f "${K2GO_OPT_DIR}/static/k2go-docs/content/index.html" ]; then
689+
cp -a "${K2GO_OPT_DIR}/static/k2go-docs/content/." /library/www/html/k2go-docs/
690+
ok "K2Go docs content deployed ($(find /library/www/html/k2go-docs -type f | wc -l) files)."
691+
else
692+
warn "K2Go docs content missing at static/k2go-docs/content; module stays hidden (404)."
693+
fi
686694
/usr/local/bin/pdsm restart nginx
687-
ok "K2Go docs module scaffold installed (hidden until docs are added)."
695+
ok "K2Go docs module installed."
688696

689697
#-----------------------------
690698
# pdf.js viewer (ADFA-4708) — static module.

0 commit comments

Comments
 (0)