From: Bram Matthys Date: Mon, 24 Apr 2023 09:50:52 +0000 (+0200) Subject: Now that we have "RPC Servers" in settings, make installer redirect to that. X-Git-Tag: 0.9~101 X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/commitdiff_plain/1a6051dbe0c8afe3247c45432db941e2f69ab449?ds=sidebyside;hp=41aad10cbe0755aee50f597cb2cadd3029de7e1d Now that we have "RPC Servers" in settings, make installer redirect to that. So instead of redirecting to settings/install2.php we now redirect to settings/rpc-servers.php. That page still needs to be modified for "initial setup instructions" though. This also renames api/installation2.php -> api/test_rpc_server.php --- diff --git a/api/installation2.php b/api/test_rpc_server.php similarity index 100% rename from api/installation2.php rename to api/test_rpc_server.php diff --git a/index.php b/index.php index b41cdad..209abd0 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ require_once "inc/common.php"; if (!isset($config['unrealircd'])) { - $redirect = get_config("base_url")."settings/install2.php"; + $redirect = get_config("base_url")."settings/rpc-servers.php"; header('Location: ' . $redirect); die; } diff --git a/login/index.php b/login/index.php index 0a920f1..d2d1700 100644 --- a/login/index.php +++ b/login/index.php @@ -54,7 +54,7 @@ if (!empty($_POST)) /* Middle of install? Override redirect: */ if (!isset($config['unrealircd'])) - $redirect = get_config("base_url")."settings/install2.php"; + $redirect = get_config("base_url")."settings/rpc-servers.php"; header('Location: ' . $redirect); die(); } diff --git a/settings/install2.php b/settings/install2.php deleted file mode 100644 index 3f9806b..0000000 --- a/settings/install2.php +++ /dev/null @@ -1,222 +0,0 @@ - - - -
-
- - - - - - - - - - - - - - - - -UnrealIRCd Panel -img/favicon.ico"> - - - - - - -
- - - - -

UnrealIRCd Admin Panel Configuration and Setup

-
-
- Take me home! -
-
$opts->rpc_user, - "rpc_password" => $opts->rpc_password, - "host"=>$opts->rpc_iphost, - "port"=>$opts->rpc_port, - "tls_verify_cert"=>isset($opts->rpc_ssl)?true:false, - ]; - - /* And write the new config */ - write_config(); - ?> -
- Great! Everything has been completely set up for you. You can now browse the admin panel.

- ">Let's go!
- - - -
-
-
RPC Uplink Information
-
- Let's get you linked with UnrealIRCd. -

- If you don't have your credentials, you will need to create them. This is done in your unrealircd.conf
View instructions
-

-
- - - The hostname or IP address of your UnrealIRCd server. You should use 127.0.0.1 for the same machine. -
-
- - - The port which you designated for RPC connections in your unrealircd.conf -
-
- - -
-
- - - The name of your rpc-user block as defined in your unrealircd.conf -
-
- - -
-
-
-
Test connection
-
- - -
- - \ No newline at end of file diff --git a/settings/rpc-servers.php b/settings/rpc-servers.php index 0840eb0..8ca94d3 100644 --- a/settings/rpc-servers.php +++ b/settings/rpc-servers.php @@ -226,7 +226,7 @@ you can switch to a secondary server in case the primary server goes down.
/* The RPC connection tester! */ function test_rpc_server() { - fetch( + 'api/installation2.php', { + fetch( + 'api/test_rpc_server.php', { method:'POST', headers: {'Content-Type':'application/x-www-form-urlencoded'}, body: 'method=rpc&'+