comparison host/update.sh @ 1630:b735ed134662

add nginx and ssl for host
author fffilimonov
date Fri, 10 Dec 2021 17:08:17 +0000
parents 124887e02dab
children 35c626c06dd5
comparison
equal deleted inserted replaced
1629:124887e02dab 1630:b735ed134662
3 set -e 3 set -e
4 4
5 ./stop.sh 5 ./stop.sh
6 6
7 echo Updating hg 7 echo Updating hg
8 #hg pull -u https://luanhost_update:njer2ndsBVG@hg.luan.software/luanhost
9 hg pull -u 8 hg pull -u
10 9
11 ../scripts/build-luan.sh 10 ../scripts/build-luan.sh
12 11
13 mkdir -p local 12 mkdir -p local
14 mkdir -p logs 13 mkdir -p logs
15 rm -f logs/* 14 rm -f logs/*
16 hg identify >logs/changeset.txt 15 hg identify >logs/changeset.txt
17 16
18 #cp startup/mime.types local/mime.types; 17 if [ ! -f local/leKey.txt ]; then
19 #./luan.sh startup/nginx.conf.luan $(pwd) $(whoami) $(id -gn) > local/nginx.conf 18 echo Register letsencrypt
20 #./luan.sh startup/nginx.default.conf.luan $(pwd) $(whoami) $(id -gn) > local/nginx.default.conf 19 ./acme.sh --register-account --cert-home ../sites --config-home local/letsencrypt/config 2>&1 | grep 'ACCOUNT_THUMBPRINT' | awk -F "'" '{print $2}' > local/leKey.txt;
20 fi;
21
22 cp startup/mime.types local/mime.types;
23 luan startup/nginx.conf.luan $(pwd) $(whoami) $(id -gn) > local/nginx.conf
24 luan startup/nginx.default.conf.luan $(pwd) $(cat local/leKey.txt) > local/nginx.default.conf
21 25
22 echo Starting... 26 echo Starting...
23 ./start.sh 27 ./start.sh