use Socket;
my $fs_passwdd_socket = "/usr/local/freeside/fs_passwdd_socket";
-my $pid_file = "$fs_passwdd_socket.pid"
+my $pid_file = "$fs_passwdd_socket.pid";
$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin';
$ENV{'SHELL'} = '/bin/sh';
if ( -e $pid_file ) {
open(PIDFILE,"<$pid_file");
- chomp( my $old_pid = <$pid_file> );
+ #chomp( my $old_pid = <PIDFILE> );
+ my $old_pid = <PIDFILE>;
close PIDFILE;
- kill 'TERM', $pid_file;
+ $old_pid =~ /^(\d+)$/;
+ kill 'TERM', $1;
}
open(PIDFILE,">$pid_file");
print PIDFILE "$$\n";