diff --git a/.gitignore b/.gitignore index e517072..e97eccd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ apicreds.txt backup certs private +apicreds.sh +accounts diff --git a/README.md b/README.md new file mode 100644 index 0000000..6b7c753 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +note: + + +``` +#!/bin/sh +# apicreds.sh +apiusr=YOUR_NAMECHEAP_USERNAME +apikey=YOUR_API_KEY +``` + diff --git a/namecheap_dns_api_hook.sh b/namecheap_dns_api_hook.sh old mode 100644 new mode 100755 index a87148f..b914da8 --- a/namecheap_dns_api_hook.sh +++ b/namecheap_dns_api_hook.sh @@ -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 diff --git a/run.sh b/run.sh old mode 100644 new mode 100755 index bbc36ae..ebc2af6 --- a/run.sh +++ b/run.sh @@ -1,3 +1,4 @@ +#!/bin/bash -x DOMAIN='*.wvr.sh' ALIAS='wildcard.wvr.sh'