ngircd-ctl.pl - fixed status command
This commit is contained in:
parent
bd187d6964
commit
1924d66f43
@ -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…
Reference in New Issue
Block a user