From d75bb27e2e30fbb2fd39de07791e2678ad3a354a Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Fri, 29 May 2020 09:35:32 -0400 Subject: renames & directory location changes --- src/dyndns-command.sh | 92 --------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100755 src/dyndns-command.sh (limited to 'src/dyndns-command.sh') diff --git a/src/dyndns-command.sh b/src/dyndns-command.sh deleted file mode 100755 index 375d50b..0000000 --- a/src/dyndns-command.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash - -die() { printf '%s\n' "$*" >&2; exit 1; } - -sql_string() -{ - printf '%s' "'${1//\'/\'\'}'" -} - -powerdns_sqlite_add_replace_record() -{ - local sql_new_domain="$(sql_string "$1.$3")" - local sql_ip_address="$(sql_string "$2")" - local sql_domain="$(sql_string "$3")" - local record_type="$(sql_string "$4")" - - DBDIR=/etc/powerdns - DBNAME=powerdns.sqlite3 - DB=$DBDIR/$DBNAME - - test -r $DB && test -w $DB || die "Wrong permissions on $DB" - test -r $DBDIR && test -w $DBDIR || die "Wrong permissions on $DBDIR" - - sqlite3 $DB <