Mercurial Hosting > luan
comparison host/update2.sh @ 2136:3ca8f933209d nginx_decoupled
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
| author | Violet7 |
|---|---|
| date | Mon, 19 Jan 2026 19:47:11 -0800 |
| parents | de3107eb911f |
| children |
comparison
equal
deleted
inserted
replaced
| 2135:e94d10d071e4 | 2136:3ca8f933209d |
|---|---|
| 11 if [ ! -f local/tiny_account.key ]; then | 11 if [ ! -f local/tiny_account.key ]; then |
| 12 echo "Register letsencrypt (tiny-acme)" | 12 echo "Register letsencrypt (tiny-acme)" |
| 13 openssl genrsa 4096 >local/tiny_account.key | 13 openssl genrsa 4096 >local/tiny_account.key |
| 14 fi | 14 fi |
| 15 | 15 |
| 16 nginx_conf_dir=$( | 16 ./gen_nginx.sh |
| 17 for d in \ | |
| 18 /usr/local/etc/nginx/servers \ | |
| 19 /etc/nginx/conf.d; do | |
| 20 if [ -d "$d" ]; then | |
| 21 echo "$d" | |
| 22 break | |
| 23 fi | |
| 24 done | |
| 25 ) | |
| 26 | |
| 27 if [ -n "$nginx_conf_dir" ]; then | |
| 28 echo "using nginx conf dir: $nginx_conf_dir" | |
| 29 else | |
| 30 echo "ERROR: No nginx conf dir found.\nFind it and add it to update2.sh." | |
| 31 exit 1 | |
| 32 fi | |
| 33 | |
| 34 # id -gn gets the name of the primary group of the current user (staff) | |
| 35 luan startup/nginx/nginx.conf.luan $(pwd) $nginx_conf_dir $(whoami) $(id -gn) | sudo tee $nginx_conf_dir/luanhost.conf >/dev/null | |
| 36 # DON'T put this in the auto-loaded configs dir, | |
| 37 # it is not meant to be loaded on its own. | |
| 38 luan startup/nginx/nginx.default.conf.luan $(pwd) >$(pwd)/local/luanhost.default.conf | |
| 39 | 17 |
| 40 # this is done because the nginx conf uses absolute paths | 18 # this is done because the nginx conf uses absolute paths |
| 41 # and this breaks sites when the luan/host directory is moved | 19 # and this breaks sites when the luan/host directory is moved |
| 42 luan classpath:luan/host/update.luan | 20 luan classpath:luan/host/update.luan |
| 43 | 21 |
| 44 echo Starting... | 22 echo "(re)Starting..." |
| 45 ./start.sh | 23 ./restart.sh |
