diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/dyndns-command.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dyndns-command.sh b/src/dyndns-command.sh index 8530058..375d50b 100755 --- a/src/dyndns-command.sh +++ b/src/dyndns-command.sh | |||
@@ -14,7 +14,15 @@ powerdns_sqlite_add_replace_record() | |||
14 | local sql_domain="$(sql_string "$3")" | 14 | local sql_domain="$(sql_string "$3")" |
15 | local record_type="$(sql_string "$4")" | 15 | local record_type="$(sql_string "$4")" |
16 | 16 | ||
17 | sqlite3 /etc/powerdns/powerdns.sqlite3 <<END | 17 | DBDIR=/etc/powerdns |
18 | DBNAME=powerdns.sqlite3 | ||
19 | DB=$DBDIR/$DBNAME | ||
20 | |||
21 | test -r $DB && test -w $DB || die "Wrong permissions on $DB" | ||
22 | test -r $DBDIR && test -w $DBDIR || die "Wrong permissions on $DBDIR" | ||
23 | |||
24 | sqlite3 $DB <<END | ||
25 | ${SQL_ECHO:+.echo on} | ||
18 | BEGIN; | 26 | BEGIN; |
19 | DELETE FROM records WHERE type=$record_type AND name=$sql_new_domain; | 27 | DELETE FROM records WHERE type=$record_type AND name=$sql_new_domain; |
20 | 28 | ||