summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-11 13:59:59 +0100
committerErich Eckner <git@eckner.net>2020-03-11 13:59:59 +0100
commit0903bc7397d4ebe33580d0895ca535988938e35a (patch)
treed62f1b28396e3bae661aa3d4b0212da03bbd607b
parent95d93d60ca0c833fc9d65e798fc8e5aed6332bc7 (diff)
downloadddns-0903bc7397d4ebe33580d0895ca535988938e35a.tar.xz
ddns.php: die with 500 in case of zone-update failure
-rw-r--r--ddns.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/ddns.php b/ddns.php
index 6f3b80f..977e47c 100644
--- a/ddns.php
+++ b/ddns.php
@@ -194,10 +194,9 @@
// actually do something
$pin = popen('nsupdate -l', 'w');
if ($pin === FALSE)
- die();
+ die_http(500, 'Internal Server Error', 'Failed to update Zone.');
fwrite($pin, $updateCommand);
-
pclose($pin);
file_put_contents('/srv/http/vhosts/eckner.net/ddns/log', $logContent, FILE_APPEND | LOCK_EX);