1628
|
1 #!/bin/bash
|
|
2
|
|
3 set -e
|
|
4
|
|
5 ./stop.sh
|
|
6
|
|
7 echo Updating hg
|
1629
|
8 hg pull -u
|
1628
|
9
|
|
10 ../scripts/build-luan.sh
|
|
11
|
|
12 mkdir -p local
|
|
13 mkdir -p logs
|
|
14 rm -f logs/*
|
|
15 hg identify >logs/changeset.txt
|
|
16
|
1630
|
17 if [ ! -f local/leKey.txt ]; then
|
|
18 echo Register letsencrypt
|
|
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
|
1628
|
25
|
|
26 echo Starting...
|
|
27 ./start.sh
|