version 1.6, 2006/10/17 05:56:34
|
version 1.8, 2025/04/27 22:15:30
|
Line 1
|
Line 1
|
#!/usr/bin/perl |
#!/usr/bin/perl |
|
# $Id$ |
|
|
$pidfile="/home/httpd/perl/logs/lonmemcached.pid"; |
$pidfile="/home/httpd/perl/logs/lonmemcached.pid"; |
$logfile="/home/httpd/perl/logs/lonmemcached.log"; |
$logfile="/home/httpd/perl/logs/lonmemcached.log"; |
|
|
Line 15 open (PIDSAVE,">$pidfile");
|
Line 17 open (PIDSAVE,">$pidfile");
|
print PIDSAVE "$$\n"; |
print PIDSAVE "$$\n"; |
close(PIDSAVE); |
close(PIDSAVE); |
|
|
|
my @args = ('-m','400','-l','127.0.0.1','-p','11211','-U','0','-v'); |
if (-e '/usr/sbin/memcached') { |
if (-e '/usr/sbin/memcached') { |
exec('/usr/sbin/memcached','-m','400','-v'); |
unshift(@args,'/usr/sbin/memcached'); |
|
exec( { $args[0] } @args); |
} elsif (-e '/usr/bin/memcached') { |
} elsif (-e '/usr/bin/memcached') { |
exec('/usr/bin/memcached','-m','400','-v'); |
unshift(@args,'/usr/bin/memcached'); |
|
exec( { $args[0] } @args); |
} else { |
} else { |
die("Unable to find memcached"); |
die("Unable to find memcached"); |
} |
} |