mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Re-add some nuked code eqemu_update.pl [skip ci]
This commit is contained in:
parent
549cabe7e8
commit
a483d37c26
@ -136,6 +136,9 @@ if($ARGV[0] eq "installer"){
|
||||
main_db_management();
|
||||
print "\nApplying Latest Database Updates...\n";
|
||||
main_db_management();
|
||||
if($OS eq "Windows"){
|
||||
check_windows_firewall_rules();
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -541,6 +544,39 @@ sub fetch_latest_windows_binaries{
|
||||
rmtree('updates_staged');
|
||||
}
|
||||
|
||||
sub check_windows_firewall_rules{
|
||||
$output = `netsh advfirewall firewall show rule name=all`;
|
||||
@output_buffer = split("\n", $output);
|
||||
$has_world_rules = 0;
|
||||
$has_zone_rules = 0;
|
||||
foreach my $val (@output_buffer){
|
||||
if($val=~/Rule Name/i){
|
||||
$val=~s/Rule Name://g;
|
||||
if($val=~/EQEmu World/i){
|
||||
$has_world_rules = 1;
|
||||
print "Found existing rule :: " . trim($val) . "\n";
|
||||
}
|
||||
if($val=~/EQEmu Zone/i){
|
||||
$has_zone_rules = 1;
|
||||
print "Found existing rule :: " . trim($val) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($has_world_rules == 0){
|
||||
print "Attempting to add EQEmu World Firewall Rules (TCP) port 9000 \n";
|
||||
print `netsh advfirewall firewall add rule name="EQEmu World (9000) TCP" dir=in action=allow protocol=TCP localport=9000`;
|
||||
print "Attempting to add EQEmu World Firewall Rules (UDP) port 9000 \n";
|
||||
print `netsh advfirewall firewall add rule name="EQEmu World (9000) UDP" dir=in action=allow protocol=UDP localport=9000 `;
|
||||
}
|
||||
if($has_zone_rules == 0){
|
||||
print "Attempting to add EQEmu Zones (7000-7500) TCP \n";
|
||||
print `netsh advfirewall firewall add rule name="EQEmu Zones (7000-7500) TCP" dir=in action=allow protocol=TCP localport=7000-7500`;
|
||||
print "Attempting to add EQEmu Zones (7000-7500) UDP \n";
|
||||
print `netsh advfirewall firewall add rule name="EQEmu Zones (7000-7500) UDP" dir=in action=allow protocol=UDP localport=7000-7500`;
|
||||
}
|
||||
}
|
||||
|
||||
sub fetch_server_dlls{
|
||||
print "Fetching lua51.dll, zlib1.dll, libmysql.dll...\n";
|
||||
get_remote_file("https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/lua51.dll", "lua51.dll", 1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user