Check Fact is already running after call it
This commit is contained in:
parent
b5a8b5f5f9
commit
9dbf492046
1 changed files with 11 additions and 1 deletions
|
|
@ -37,7 +37,17 @@ sub fact_exec
|
||||||
{
|
{
|
||||||
my $cmd = shift;
|
my $cmd = shift;
|
||||||
my $rundir = shift;
|
my $rundir = shift;
|
||||||
jail_exec("cd $rundir && /usr/local/bin/mono /usr/local/fact/FactExe.exe $cmd");
|
|
||||||
|
# Check that Fact is running
|
||||||
|
qx/pgrep mono/;
|
||||||
|
while ($?)
|
||||||
|
{
|
||||||
|
log ERROR, "Fact is not running ... waiting for respawn";
|
||||||
|
sleep(10);
|
||||||
|
qx/pgrep mono/;
|
||||||
|
}
|
||||||
|
|
||||||
|
jail_exec("cd '$rundir' && /usr/local/bin/mono /usr/local/fact/FactExe.exe $cmd");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub prepare_dir
|
sub prepare_dir
|
||||||
|
|
|
||||||
Reference in a new issue