Mercurial Hosting > luan
annotate host/update.sh @ 2096:c5b2b0bb841e ssltesting
inline update_ssl_conf.sh
| author | Violet7 |
|---|---|
| date | Mon, 15 Dec 2025 19:28:17 -0800 |
| parents | a4435e2e3417 |
| children | c1594d23d45b |
| rev | line source |
|---|---|
| 1628 | 1 #!/bin/bash |
| 2 | |
| 3 set -e | |
| 4 | |
| 2096 | 5 SCRIPT_DIR="$(cd -- "$(dirname -- "$0")" && pwd)" |
| 6 cd $SCRIPT_DIR | |
| 7 | |
| 1628 | 8 ./stop.sh |
| 9 | |
| 10 echo Updating hg | |
| 1629 | 11 hg pull -u |
| 1628 | 12 |
| 13 ../scripts/build-luan.sh | |
| 14 | |
| 15 mkdir -p local | |
| 16 mkdir -p logs | |
| 17 rm -f logs/* | |
| 18 hg identify >logs/changeset.txt | |
| 19 | |
| 2037 | 20 if [ ! -f local/tiny_account.key ]; then |
| 2096 | 21 echo "Register letsencrypt (tiny-acme)" |
| 22 openssl genrsa 4096 >local/tiny_account.key | |
|
2015
61b0cc7db09c
Manually specify letsencrypt server due to acme default server change (to zerossl)
Violet7
parents:
1632
diff
changeset
|
23 fi |
| 1630 | 24 |
|
2015
61b0cc7db09c
Manually specify letsencrypt server due to acme default server change (to zerossl)
Violet7
parents:
1632
diff
changeset
|
25 cp startup/nginx/mime.types local/mime.types |
| 2037 | 26 # id -gn gets the name of the primary group of the current user (staff) |
|
2015
61b0cc7db09c
Manually specify letsencrypt server due to acme default server change (to zerossl)
Violet7
parents:
1632
diff
changeset
|
27 luan startup/nginx/nginx.conf.luan $(pwd) $(whoami) $(id -gn) >local/nginx.conf |
| 2037 | 28 luan startup/nginx/nginx.default.conf.luan $(pwd) >local/nginx.default.conf |
| 1628 | 29 |
| 2096 | 30 # this is done because the nginx conf uses absolute paths |
| 31 # and this breaks sites when the luan/host directory is moved | |
| 32 for conf in sites/*/nginx.ssl.conf; do | |
| 33 domain=$(basename $(dirname "$conf")) | |
| 34 luan startup/nginx/nginx.ssl.conf.luan $here $domain >$conf | |
| 35 done | |
| 36 | |
| 1628 | 37 echo Starting... |
| 38 ./start.sh |
