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

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