]> git.refcnt.org Git - distdns.git/blobdiff - server.cgi
Make switches mutually exclusive
[distdns.git] / server.cgi
index f9f8579009c71558664a7cf0c127d5a4bc028701..43bf0bd302489dc30ffac9de781f7f3bd7e53837 100755 (executable)
@@ -81,6 +81,10 @@ if ($params{init}) {
     open(my $fh, '>', $session_file) or die "Cannot open $session_file for writing: $!\n";
     print {$fh} "$params{session}\n";
     close($fh);
+
+    print $query->header('application/json');
+    print encode_json({ entries => [], error => undef });
+    exit;
 }
 else {
     open(my $fh, '<', $session_file) or die "Cannot open $session_file for reading: $!\nPerhaps try running --init\n";