Add warning for crazy install dir

This commit is contained in:
Jamie Cameron
2013-10-27 15:31:23 -07:00
parent c209a4e2a8
commit a13203f42c
2 changed files with 8 additions and 1 deletions

View File

@@ -4,11 +4,17 @@
use strict;
use warnings;
require './minecraft-lib.pl';
our (%in, %text, %config, $module_name);
our (%in, %text, %config, $module_name, $module_root_directory);
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
&help_search_link("minecraft", "google"));
# Check for sane root dir
if ($config{'minecraft_dir'} eq $module_root_directory) {
&ui_print_endpage(&text('index_rooterr', $module_root_directory,
"../config.cgi?$module_name"));
}
my $err = &check_minecraft_server();
if ($err && &is_minecraft_port_in_use()) {
# Not found, but server appears to be running

View File

@@ -1,6 +1,7 @@
index_title=Minecraft Server
index_cerr=An error was detected with your Minecraft server : $1. You may need to adjust the <a href='$2'>module configuration</a>.
index_cerr2=The Minecraft server does not appear to be installed on your system. If it is already running, you will need to adjust the <a href='$1'>module configuration</a> to use the correct paths.
index_rooterr=The Minecraft root directory is set on the <a href='$1'>module configuration</a> page to <tt>$2</tt>, but this is the same as the Webmin module directory!
index_nojava=Also, the Java command <tt>$1</tt> needed to run Minecraft was not found.
index_offer=Alternatively, Webmin can automatically download and install the Minecraft server for you.
index_dir=Install into directory