]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Redirect from main page to install2.php if not ready yet
authorBram Matthys <redacted>
Fri, 21 Apr 2023 10:36:41 +0000 (12:36 +0200)
committerBram Matthys <redacted>
Fri, 21 Apr 2023 10:36:41 +0000 (12:36 +0200)
(this should probably be moved elsewhere but whatever)

index.php

index dbd4e03611d627c86d04b8c8768d37ff25f29786..77e00bfe7495af4ead05c91a6c15e0236b4ab94d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,5 +1,12 @@
 <?php
 require_once "common.php";
+if (!isset($config['unrealircd']) || empty($config['unrealircd']['host']))
+{
+       $redirect = get_config("base_url")."settings/install2.php";
+       header('Location: ' . $redirect);
+       die;
+}
+
 require_once "header.php";
 require_once "connection.php";