Changeset 17829 for misc/runpugs/scripts

Show
Ignore:
Timestamp:
09/14/07 10:47:19 (15 months ago)
Author:
azawawi
Message:

[runpugs] updated p5 script to killall for current user

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • misc/runpugs/scripts/restart_runpugs

    r17826 r17829  
    11#!/usr/bin/perl 
    2 my @insts=`ps x | grep termserv | grep -v grep`; 
    3 for my $inst (@insts) { 
    4 my $pid=$inst; 
    5 $pid =~ s/^\s*//; 
    6 $pid =~ s/\s+.*$//; 
    7 print "kill 9,$pid\n"; 
    8 kill 9,$pid; 
    9 } 
    10 chdir '/home/andara/apache/bin'; 
    11 system('/usr/bin/perl ./termserv.pl'); 
    122 
     3use strict; 
     4use Env qw(HOME USER); 
     5 
     6print "Killing all instances of 'termserv.pl' for $USER\n"; 
     7system("killall --user $USER termserv.pl"); 
     8chdir "$ENV{HOME}/runpugs/bin"; 
     9print "Executing './termserv.pl' in the background\n"; 
     10system("(./termserv.pl > /dev/null &2>1)&"); 
     11