Explorar el Código

ngircd-ctl.pl - fixed status command

master
gashapwn hace 3 años
padre
commit
1924d66f43
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. +3
    -2
      perl-script/ngircd-ctl.pl

+ 3
- 2
perl-script/ngircd-ctl.pl Ver fichero

@@ -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{


Cargando…
Cancelar
Guardar