Mercurial Hosting > luan
diff host/update2.sh @ 2122:ce75c0136e28
merge
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 07 Jan 2026 14:00:43 -0700 |
| parents | 059afc92310b |
| children | 6a2383baecb6 eb5bdf29a664 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/host/update2.sh Wed Jan 07 14:00:43 2026 -0700 @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +../scripts/build-luan.sh + +mkdir -p local +mkdir -p logs +rm -f logs/* +hg identify >logs/changeset.txt + +if [ ! -f local/tiny_account.key ]; then + echo "Register letsencrypt (tiny-acme)" + openssl genrsa 4096 >local/tiny_account.key +fi + +cp startup/nginx/mime.types local/mime.types +# id -gn gets the name of the primary group of the current user (staff) +luan startup/nginx/nginx.conf.luan $(pwd) $(whoami) $(id -gn) >local/nginx.conf +luan startup/nginx/nginx.default.conf.luan $(pwd) >local/nginx.default.conf + +# this is done because the nginx conf uses absolute paths +# and this breaks sites when the luan/host directory is moved +luan classpath:luan/host/update.luan + +echo Starting... +./start.sh
