#!/usr/bin/perl

#####################################
#  Eureka Round Robin Server 1.0.1  #
#####################################

use cleanserver_roundrobin;

my $pidfile = "/var/log/rrserver.pid";

do {
  if (-e $pidfile) {
    open(F,"<$pidfile"); my $p=<F>; close F; chomp($p);
    if ($p>0) { kill 9 => $p }
  }
  `echo $$ > $pidfile`;
  cleanserver_roundrobin::start();
} until 0;

