Return to lonmemcached CVS log | Up to [LON-CAPA] / loncom |
- adding memcached as a daemon we need to start up
#!/usr/bin/perl $pidfile="/home/httpd/perl/logs/lonmemcached.pid"; $logfile="/home/httpd/perl/logs/lonmemcached.log"; if (-e $pidfile) { open(LFH,"$pidfile"); my $pide=<LFH>; chomp($pide); close(LFH); if (kill 0 => $pide) { die "already running $pide"; } } if ($pid=fork()) { exit; } open (PIDSAVE,">$pidfile"); print PIDSAVE "$$\n"; close(PIDSAVE); exec("/usr/local/bin/memcached -m 256 -v > $logfile");