paritybit.ca

Raw content of https://www.paritybit.ca.
git clone https://git.sr.ht/~jbauer/paritybit.ca
Log | Files | Refs | README | LICENSE

commit 0fff2de693aee3e2b9a00c6fe1cc7ff6ad77a4a4
parent 0e5874eafcddae6e05eac7021dcddffd324691b2
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat, 20 Aug 2022 19:03:32 -0400

*

Diffstat:
Mconfig.ini | 2+-
Mcontent/garden/arboretum/documentation/sysadmin/openbsd-server-details.gmi | 24++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/config.ini b/config.ini @@ -3,4 +3,4 @@ siteName = paritybit.ca languageCode = en-ca blogDir = blog/ buildOptions = -Thtml --html-no-skiphtml --html-no-escapehtml -pushcmd = rsync -rdv static/* cerberus:/var/www/paritybit.ca/ && ssh cerberus "chown -R www /var/www/paritybit.ca/" +pushcmd = rsync -rv --delete static/* cerberus:/var/www/paritybit.ca/ && ssh cerberus "./update-sites" diff --git a/content/garden/arboretum/documentation/sysadmin/openbsd-server-details.gmi b/content/garden/arboretum/documentation/sysadmin/openbsd-server-details.gmi @@ -175,6 +175,30 @@ relay "gemini" { The content of the gemini server is a git repository that lives in /var/gemini. When updates to the wiki are made, I can simply SSH into the server and run `git pull` to update the content. The _vger group has the ability to read the contents of /var/gemini but only root has permissions for the .git folder so the gemini server can't serve it. +### Updating the Gemini and HTTP Server Content + +When pushing new content to my web site or gemini capsule, a few things need to be done. The script below handles gzipping new or updated content on the site to take advantage of httpd's static gzip capabilities, and it updates the gemini capsule with the latest changes. It also makes sure all files have the correct ownership. + +```update-sites +#!/bin/sh + +# Update the website +gzip -fkrq /var/www/paritybit.ca/ 2>/dev/null +chown -R www:daemon /var/www/paritybit.ca + +# Update the Gemini site +cd ~ +if [ -d paritybit.ca ]; then + cd paritybit.ca; git pull; cd .. +else + git clone git://git.paritybit.ca/paritybit.ca +fi + +cp -r paritybit.ca/content/garden/* paritybit.ca/static/img /var/gemini/ + +chown -R _vger:_vger /var/gemini/ +``` + ### Finger Server The configuration in inetd for fingerd is: