Mercurial Hosting > luan
view host/update2.sh @ 2133:c3b4c19f2d8a
attempt to autodetect and use nginx confs dir
| author | Violet7 |
|---|---|
| date | Fri, 16 Jan 2026 17:29:05 -0800 |
| parents | 6a2383baecb6 |
| children | de3107eb911f |
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 nginx_conf_dir=$( for d in \ /usr/local/etc/nginx/servers \ /etc/nginx/conf.d; do if [ -d "$d" ]; then echo "$d" break fi done ) if [ -n "$nginx_conf_dir" ]; then echo "using nginx conf dir: $nginx_conf_dir" else echo "ERROR: No nginx conf dir found.\nFind it and add it to update2.sh." exit 1 fi # id -gn gets the name of the primary group of the current user (staff) luan startup/nginx/nginx.conf.luan $(pwd) $nginx_conf_dir $(whoami) $(id -gn) | sudo tee $nginx_conf_dir/luanhost.conf >/dev/null luan startup/nginx/nginx.default.conf.luan $(pwd) | sudo tee $nginx_conf_dir/luanhost.default.conf >/dev/null # 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
