mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-19 23:26:11 +00:00
chore: certbot script to bun
This commit is contained in:
+4
-4
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export ENV=production
|
||||
export NODE_ENV=production
|
||||
DRY_RUN=0
|
||||
if_dry_run() { [[ $DRY_RUN == 1 ]] && echo "$1" || echo "$2"; }
|
||||
|
||||
@@ -32,7 +32,7 @@ update_record() {
|
||||
local name="$3";
|
||||
local address="$4";
|
||||
local ttl=${5:-"1"};
|
||||
echo "
|
||||
bun -e "
|
||||
const { domainService } = require('./utils/domain-service');
|
||||
const { ENV, DOMAIN_DOMAIN } = require('./utils/constants');
|
||||
const method = '$method';
|
||||
@@ -57,7 +57,7 @@ update_record() {
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
" | node -
|
||||
"
|
||||
}
|
||||
|
||||
update_acme_txt_record() {
|
||||
@@ -68,6 +68,7 @@ reset_acme() {
|
||||
sleep 1;
|
||||
update_record remove TXT '_acme-challenge' '';
|
||||
update_record remove TXT '_acme-challenge' '';
|
||||
# update_record add CNAME 'www' "is-a-dev.github.io";
|
||||
}
|
||||
|
||||
get_acme() { dig +noall +answer _acme-challenge.is-a.dev TXT | awk '{print $5}'; }
|
||||
@@ -84,7 +85,6 @@ esac
|
||||
|
||||
### STEPS ###
|
||||
# Run ./scripts/certbot.sh cert
|
||||
# Run ./scripts/certbot.sh acme_txt "<key>"
|
||||
# cp -r /tmp/is-a-dev-whatever /opt/app/code/is-a-dev-cert
|
||||
# Upload cert.pem and privkey.pem (from config/live/is-a.dev/) contents to SSL > Manage SSL Sites
|
||||
# Run ./scripts/certbot.sh reset
|
||||
|
||||
Reference in New Issue
Block a user