Handle hostnames with upper-case letters
[webmin.git] / init / create-boot.pl
1 #!/usr/local/bin/perl
2 # Creates some boot-time action
3
4 package server_manager;
5 $main::no_acl_check++;
6 $ENV{'WEBMIN_CONFIG'} ||= "/etc/webmin";
7 $ENV{'WEBMIN_VAR'} ||= "/var/webmin";
8 if ($0 =~ /^(.*\/)[^\/]+$/) {
9         chdir($1);
10         }
11 chop($pwd = `pwd`);
12 $0 = "$pwd/create-boot.pl";
13 require './init-lib.pl';
14 $< == 0 || die "$0 must be run as root";
15
16 @ARGV >= 1 && @ARGV <= 4 ||
17         die "usage: create-boot.pl <name> [desc] [start-code] [stop-code]";
18
19 &enable_at_boot(@ARGV);