Browse Source

ngircd-ctl.pl - fixed status command

master
gashapwn 3 years ago
parent
commit
1924d66f43
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      perl-script/ngircd-ctl.pl

+ 3
- 2
perl-script/ngircd-ctl.pl View File

@@ -4,7 +4,7 @@ use warnings;
use strict; use strict;


my @MY_ARGV = @ARGV; my @MY_ARGV = @ARGV;
my $MY_ACMD = shift;
my $MY_ACMD = shift || "";


my $NGIRCD='ngircd'; my $NGIRCD='ngircd';
my $NGIRCD_UID = 703; my $NGIRCD_UID = 703;
@@ -24,7 +24,8 @@ if ($MY_ACMD eq "stop"){
}elsif($MY_ACMD eq "start"){ }elsif($MY_ACMD eq "start"){
$ERROR = system("$NGIRCD"); $ERROR = system("$NGIRCD");
}elsif($MY_ACMD eq "status"){ }elsif($MY_ACMD eq "status"){
$ERROR = system("rcctl check $NGIRCD");
$ERROR = system("pgrep -u $NGIRCD_UID $NGIRCD");
printf("%s(ok)\n", $NGIRCD) if ($ERROR == 0);
}elsif($MY_ACMD eq "help"){ }elsif($MY_ACMD eq "help"){
printf("$USAGE\n"); printf("$USAGE\n");
}else{ }else{


Loading…
Cancel
Save