%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.248 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/shorewall/ |
Upload File : |
#!/usr/bin/perl # index.cgi # Display icons for the various shorewall configuration files require './shorewall-lib.pl'; if (!&has_command($config{'shorewall'})) { &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); print "<p>",&text('index_ecmd', "<tt>$config{'shorewall'}</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n"; } else { # Get the version $shorewall_version = &get_shorewall_version(1); &open_tempfile(VERSION, ">$module_config_directory/version"); &print_tempfile(VERSION, $shorewall_version,"\n"); &close_tempfile(VERSION); &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0, &help_search_link("shorewall", "doc", "google"), undef, undef, &text('index_version', &get_printable_version($shorewall_version))); if (!-d $config{'config_dir'}) { # Config dir not found! print "<p>",&text('index_edir', "<tt>$config{'config_dir'}</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n"; } else { # Just show the file icons @files = grep { &can_access($_) } @shorewall_files; @titles = map { $text{&clean_name($_)."_title"}."<br>($_)" } @files; @links = map { "list.cgi?table=".$_ } @files; @icons = map { "images/".$_.".gif" } @files; &icons_table(\@links, \@titles, \@icons, 4); # Check if shorewall is running by looking for the 'shorewall' # chain in the filter table print &ui_hr(); print &ui_buttons_start(); my $ex = system("$config{'shorewall'} status 2>&1"); if ($ex && !$access{'nochange'}) { # Down .. offer to start print &ui_buttons_row( "start.cgi", $text{'index_start'}, $text{'index_startdesc'}); } elsif (!$ex && !$access{'nochange'}) { # Up .. offer to restart, clear and stop print &ui_buttons_row( "restart.cgi", $text{'index_restart'}, $text{'index_restartdesc'}); print &ui_buttons_row( "refresh.cgi", $text{'index_refresh'}, $text{'index_refreshdesc'}); print &ui_buttons_row( "clear.cgi", $text{'index_clear'}, $text{'index_cleardesc'}); print &ui_buttons_row( "stop.cgi", $text{'index_stop'}, $text{'index_stopdesc'}); } if (!$ex) { print &ui_buttons_row( "status.cgi", $text{'index_status'}, $text{'index_statusdesc'}); } # Check and dump buttons print &ui_buttons_row( "check.cgi", $text{'index_check'}, $text{'index_checkdesc'}); print &ui_buttons_row( "dump.cgi", $text{'index_dump'}, $text{'index_dumpdesc'}); print &ui_buttons_end(); } } &ui_print_footer("/", $text{'index'});