-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.sh
executable file
·22 lines (19 loc) · 1.15 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# vars
nicruUser="xxx/NIC-D" # NIC.RU COMMON ACCOUNT LOGIN
nicruPass="xxx" # NIC.RU COMMON ACCOUNT PASSWORD
nicruAppLogin="xxx" # app "letsencrypt_nicru" APP-LOGIN
nicruAppPass="xxx" # app "letsencrypt_nicru" APP-PASSWORD
nicruServiceName="<SERVICE_ID>" # go to "Услуги/DNS-хостинг", column "Услуга" contains alphabetical name <SERVICE_ID>
domain="example.com" # domain for cert create
subdomain="_acme-challenge" # subdomain "_acme-challenge", don't change it
letsencryptServer="https://acme-v02.api.letsencrypt.org/directory" # letsencrypt server url
email="clesssalvein@gmail.com" # email for notifies
# certbot run
certbot certonly --manual --preferred-challenges=dns \
--manual-auth-hook "./nicru-auth.sh $nicruUser $nicruPass $nicruAppLogin $nicruAppPass $nicruServiceName $subdomain $domain" \
--manual-cleanup-hook "./nicru-cleanup.sh $nicruUser $nicruPass $nicruAppLogin $nicruAppPass $nicruServiceName $subdomain $domain" \
-d *.$domain -d $domain --email=$email \
--server $letsencryptServer --agree-tos --non-interactive --manual-public-ip-logging-ok --force-renewal #--dry-run
# nginx reload
/usr/sbin/nginx -s reload