Selaa lähdekoodia

ngircd-ctl.pl - fixed status command

master
gashapwn 3 vuotta sitten
vanhempi
commit
1924d66f43
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. +3
    -2
      perl-script/ngircd-ctl.pl

+ 3
- 2
perl-script/ngircd-ctl.pl Näytä tiedosto

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

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

my $NGIRCD='ngircd';
my $NGIRCD_UID = 703;
@@ -24,7 +24,8 @@ if ($MY_ACMD eq "stop"){
}elsif($MY_ACMD eq "start"){
$ERROR = system("$NGIRCD");
}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"){
printf("$USAGE\n");
}else{


Loading…
Peruuta
Tallenna