Fix to check if helper command is running as root

This commit is contained in:
Ilia Ross
2025-10-04 01:12:05 +03:00
parent face8319f2
commit 28c7939636

View File

@@ -9,6 +9,13 @@ use Getopt::Long qw(:config permute pass_through);
use Term::ANSIColor qw(:constants);
use Pod::Usage;
# Check if root
if ($> != 0) {
die BRIGHT_RED, "Error: ", RESET, BRIGHT_YELLOW,"webmin", RESET,
" command must be run as root\n";
exit 1;
}
my $a0 = $ARGV[0];
sub main {