view host/update2.sh @ 2130:aaf2795f4ed8 default tip

more doc on nginx install
author Violet7
date Fri, 16 Jan 2026 15:59:00 -0800
parents 6a2383baecb6
children
line wrap: on
line source

#!/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

# 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
# NOTE: if the luanhost root dir changes, the nginx include needs to be manually updated to reflect the new path.
luan classpath:luan/host/update.luan

echo Starting...
./start.sh