version 1.39, 2006/08/25 21:25:22
|
version 1.41, 2007/03/28 20:43:37
|
Line 348 system('/bin/chown','-R',"$safeusername:
|
Line 348 system('/bin/chown','-R',"$safeusername:
|
# system('/bin/chown',"$safeusername:www","/home/$safeusername"); # Now adust top level... |
# system('/bin/chown',"$safeusername:www","/home/$safeusername"); # Now adust top level... |
# system('/bin/chown','-R',"$safeusername:www","/home/$safeusername/public_html"); # And web dir. |
# system('/bin/chown','-R',"$safeusername:www","/home/$safeusername/public_html"); # And web dir. |
# ---------------------------------------------------- Gracefull Apache Restart |
# ---------------------------------------------------- Gracefull Apache Restart |
|
my $pidfile; |
if (-e '/var/run/httpd.pid') { |
if (-e '/var/run/httpd.pid') { |
|
$pidfile = '/var/run/httpd.pid'; |
|
} elsif (-e '/var/run/httpd2.pid') { #Apache 2 on SuSE 10.1 and SLES10 |
|
$pidfile = '/var/run/httpd2.pid'; |
|
} |
|
|
|
if ($pidfile) { |
print "lcuseradd Apache restart\n" unless $noprint; |
print "lcuseradd Apache restart\n" unless $noprint; |
open(PID,'/var/run/httpd.pid'); |
open(PID,"<$pidfile"); |
my $pid=<PID>; |
my $pid=<PID>; |
close(PID); |
close(PID); |
$pid=~ /(\D+)/; |
$pid=~ /(\D+)/; |
Line 372 sub enable_root_capability {
|
Line 379 sub enable_root_capability {
|
} else { |
} else { |
# root capability is already enabled |
# root capability is already enabled |
} |
} |
|
if ($wwwid == $>) { |
|
print("Failed to become root\n") unless $noprint; |
|
} else { |
|
print("Became root\n") unless $noprint; |
|
} |
return $>; |
return $>; |
} |
} |
|
|