add separate setupcheck file
[phorkie.git] / www / setup.php
diff --git a/www/setup.php b/www/setup.php
new file mode 100644 (file)
index 0000000..b042339
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Check if all is setup correctly
+ */
+namespace phorkie;
+$reqWritePermissions = false;
+require_once 'www-header.php';
+
+if (!$GLOBALS['phorkie']['cfg']['setupcheck']) {
+    header('HTTP/1.0 403 Forbidden');
+    header('Content-type: text/plain');
+    echo "Setup check is disabled\n";
+    exit(1);
+}
+
+header('Content-type: text/plain');
+echo "All fine\n";
+?>