-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGO-test.sh
executable file
·46 lines (35 loc) · 989 Bytes
/
GO-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
#
# ./GO myserver.com toto@myserver.com
#
server=$1
email=$2
/bin/rm -fr output
/bin/rm -fr live
./node_modules/.bin/letsencrypt certonly \
--agree-tos --email $email \
--standalone \
--rsa-key-size 2048 \
--domains $server \
--cert-path $server-cert.pem \
--fullchain-path $server-fullchain.pem \
--chain-path $server-chain.pem \
--server https://acme-staging.api.letsencrypt.org/directory \
--config-dir $PWD/output/etc
cp output/etc/live/$server/privkey.pem $server-privkey.pem
/bin/rm -fr output
/bin/rm -fr live
mkdir live
mv $server-privkey.pem live/$server-server.key
mv $server-cert.pem live/$server-server.crt
mv $server-chain.pem live/$server-ca.crt
/bin/rm -f *.pem
echo ""
echo "SAGE2 certificates in 'live' folder"
echo ""
# for testing:
# https://acme-staging.api.letsencrypt.org/directory
# for production:
# https://acme-v01.api.letsencrypt.org/directory
# personal server (docker)
# --server http://localhost:4000/directory