CVS: ispman/bin ispman-agent,1.56,1.57
Atif Ghaffar <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv23611
Modified Files:
ispman-agent
Log Message:
removing the tests etc. The person who made the changes was perhaps not aware of the nodetach feature
Index: ispman-agent
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman-agent,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** ispman-agent 8 Oct 2003 00:15:12 -0000 1.56
--- ispman-agent 8 Oct 2003 23:33:10 -0000 1.57
***************
*** 76,82 ****
my ($pid, $job);
! unless ($ARGV[0] && lc($ARGV[0]) eq "start") {
! if ($ARGV[0] && (lc($ARGV[0]) eq "stop" || lc($ARGV[0]) eq "restart" ||
! lc($ARGV[0]) eq "forcerestart")) {
unless (-e $pid_file) {
print "pid file $pid_file not found\n";
--- 76,99 ----
my ($pid, $job);
! if ($ARGV[0]=~/stop|restart|forcerestart/i){
! unless (-e $pid_file){
! print "pid file $pid_file not found\n";
! print "No ispman-agent processes running?\n";
! print "Instead use $FindBin::Script start\n";
! exit(0);
! }
!
! my $pid=`cat $pid_file`;
! chomp $pid;
! print "Shutting down $name\n";
! kill 15, $pid;
! print "killed process $pid\n";
! print "Shutdown complete\n";
! unlink $pid_file && exit(0) if $ARGV[0] =~/stop/i;
! unlink $pid_file if $ARGV[0] =~ /forcerestart/i;
! sleep (1) if $ARGV[0] =~/restart/i;
! }
!
! if ($ARGV[0] && ($ARGV[0] =~ /stop|restart|forcerestart/i)) {
unless (-e $pid_file) {
print "pid file $pid_file not found\n";
***************
*** 94,103 ****
unlink $pid_file if lc($ARGV[0]) eq "forcerestart";
sleep(1) if lc($ARGV[0]) eq "restart";
- } else {
- print "Usage: $name {start|stop|restart|forcerestart} [nodetach]\n";
- # Exit here or assume start? I choose exit that is what forcerestart is for
- exit(1);
}
- }
$SIG{TERM} = sub {
--- 111,115 ----
***************
*** 109,113 ****
print "pid file already exists? unclean shudown?\n";
# This shouldn't exit here but it should perhaps use a killall $name ?
! # exit(0);
}
--- 121,125 ----
print "pid file already exists? unclean shudown?\n";
# This shouldn't exit here but it should perhaps use a killall $name ?
! exit(1);
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php