Server IP : 195.201.23.43 / Your IP : 3.12.107.192 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/virtual-server/ |
Upload File : |
#!/usr/bin/perl =head1 check-config.pl Run the Virtualmin config check This program checks your system's Virtualmin configuration, outputting the progress of the check as it goes. If any serious problems are found it will halt and display the error found. Otherwise, it may also update global settings determined by the Virtualmin configuration, such as Webmin modules granted to domain owners. =cut package virtual_server; if (!$module_name) { $main::no_acl_check++; $ENV{'WEBMIN_CONFIG'} ||= "/etc/webmin"; $ENV{'WEBMIN_VAR'} ||= "/var/webmin"; if ($0 =~ /^(.*)\/[^\/]+$/) { chdir($pwd = $1); } else { chop($pwd = `pwd`); } $0 = "$pwd/check-scripts.pl"; require './virtual-server-lib.pl'; $< == 0 || die "check-scripts.pl must be run as root"; } @OLDARGV = @ARGV; while(@ARGV > 0) { local $a = shift(@ARGV); if ($a eq "--multiline") { $multiline = 1; } elsif ($a eq "--help") { &usage(); } else { &usage("Unknown parameter $a"); } } &set_all_text_print(); &read_file("$module_config_directory/last-config", \%lastconfig); $cerr = &html_tags_to_text(&check_virtual_server_config(\%lastconfig)); if ($cerr) { print "ERROR: $cerr\n"; } else { # See if any options effecting Webmin users have changed if (&need_update_webmin_users_post_config(\%lastconfig)) { &modify_all_webmin(); if ($virtualmin_pro) { &modify_all_resellers(); } } # Setup the licence cron job (if needed) &setup_licence_cron(); # Apply the new config &run_post_config_actions(\%lastconfig); # Clear cache of links &clear_links_cache(); &run_post_actions(); print "OK\n"; } &virtualmin_api_log(\@OLDARGV, $doms[0]); exit($cerr ? 1 : 0); sub usage { print "$_[0]\n\n" if ($_[0]); print "Checks the current Virtualmin configuration.\n"; print "\n"; print "virtualmin check-config\n"; exit(1); }Private