Mercurial Hosting > luan
annotate host/update.sh @ 2102:3112b06ab447 ssltesting
add host/update.luan
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 16 Dec 2025 16:53:43 -0700 |
| parents | 41b8b2cbbdf8 |
| children |
| rev | line source |
|---|---|
| 1628 | 1 #!/bin/bash |
| 2 | |
| 3 set -e | |
| 2099 | 4 # prevents error if there is nothing in sites/ |
| 5 shopt -s nullglob | |
| 1628 | 6 |
| 2096 | 7 SCRIPT_DIR="$(cd -- "$(dirname -- "$0")" && pwd)" |
| 8 cd $SCRIPT_DIR | |
| 9 | |
| 1628 | 10 ./stop.sh |
| 11 | |
| 12 echo Updating hg | |
| 1629 | 13 hg pull -u |
| 1628 | 14 |
| 15 ../scripts/build-luan.sh | |
| 16 | |
| 17 mkdir -p local | |
| 18 mkdir -p logs | |
| 19 rm -f logs/* | |
| 20 hg identify >logs/changeset.txt | |
| 21 | |
| 2037 | 22 if [ ! -f local/tiny_account.key ]; then |
| 2096 | 23 echo "Register letsencrypt (tiny-acme)" |
| 24 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
|
25 fi |
| 1630 | 26 |
|
2015
61b0cc7db09c
Manually specify letsencrypt server due to acme default server change (to zerossl)
Violet7
parents:
1632
diff
changeset
|
27 cp startup/nginx/mime.types local/mime.types |
| 2037 | 28 # 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
|
29 luan startup/nginx/nginx.conf.luan $(pwd) $(whoami) $(id -gn) >local/nginx.conf |
| 2037 | 30 luan startup/nginx/nginx.default.conf.luan $(pwd) >local/nginx.default.conf |
| 1628 | 31 |
| 2096 | 32 # this is done because the nginx conf uses absolute paths |
| 33 # and this breaks sites when the luan/host directory is moved | |
|
2102
3112b06ab447
add host/update.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
2099
diff
changeset
|
34 luan classpath:luan/host/update.luan |
| 2096 | 35 |
| 1628 | 36 echo Starting... |
| 37 ./start.sh |
