This commit is contained in:
wvr
2023-08-28 02:31:05 -05:00
parent 73d864990c
commit cb3630a405
4 changed files with 17 additions and 5 deletions

2
.gitignore vendored
View File

@@ -2,3 +2,5 @@ apicreds.txt
backup backup
certs certs
private private
apicreds.sh
accounts

10
README.md Normal file
View File

@@ -0,0 +1,10 @@
note:
```
#!/bin/sh
# apicreds.sh
apiusr=YOUR_NAMECHEAP_USERNAME
apikey=YOUR_API_KEY
```

9
namecheap_dns_api_hook.sh Normal file → Executable file
View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
# #
# shellcheck disable=2317,2086,2178,2001,2004,2181,2068 # shellcheck disable=2317,2086,2178,2001,2004,2181,2068
@@ -302,14 +302,12 @@ function request_failure() {
function startup_hook() { function startup_hook() {
# This hook is called before the cron command to do some initial tasks # This hook is called before the cron command to do some initial tasks
# (e.g. starting a webserver). # (e.g. starting a webserver).
: :
} }
function exit_hook() { function exit_hook() {
# This hook is called at the end of the cron command and can be used to # This hook is called at the end of the cron command and can be used to
# do some final (cleanup or other) tasks. # do some final (cleanup or other) tasks.
: :
} }
@@ -319,8 +317,9 @@ function load_config() {
apiusr= apiusr=
apikey= apikey=
RECORDS_BACKUP=${BASEDIR}/records_backup RECORDS_BACKUP=${BASEDIR}/records_backup
DEPLOYED_CERTDIR=/etc/pki/tls/certs DEPLOYED_CERTDIR=$PWD/certs
DEPLOYED_KEYDIR=/etc/pki/tls/private DEPLOYED_KEYDIR=$PWD/private
mkdir -p "$DEPLOYED_KEYDIR" "$DEPLOYED_CERTDIR" "$RECORDS_BACKUP"
# Check if config file exists # Check if config file exists
if [[ ! -f "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/config" ]]; then if [[ ! -f "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/config" ]]; then

1
run.sh Normal file → Executable file
View File

@@ -1,3 +1,4 @@
#!/bin/bash -x
DOMAIN='*.wvr.sh' DOMAIN='*.wvr.sh'
ALIAS='wildcard.wvr.sh' ALIAS='wildcard.wvr.sh'