Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
4bffc409
Commit
4bffc409
authored
Nov 28, 2016
by
Francesc Guasch
Browse files
[#66] ping is enough if pid file is there
parent
c053c2c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/Request.pm
View file @
4bffc409
...
...
@@ -25,6 +25,8 @@ our $args_manage = { name => 1 , uid => 1 };
our
$args_prepare
=
{
id_domain
=>
1
,
uid
=>
1
};
our
$args_remove_base
=
{
domain
=>
1
,
uid
=>
1
};
our
$PID_FILE_BACKEND
=
'
/var/run/rvd_back.pl.pid
';
our
%VALID_ARG
=
(
create_domain
=>
{
vm
=>
1
...
...
@@ -351,7 +353,15 @@ sub ping_backend {
my
$self
=
{};
bless
(
$self
,
$class
);
return
$self
->
_new_request
(
command
=>
'
ping_backend
'
);
return
(
$self
->
_ping_backend_localhost
()
or
$self
->
_new_request
(
command
=>
'
ping_backend
'
));
}
sub
_ping_backend_localhost
{
my
$self
=
shift
;
return
1
if
-
e
$PID_FILE_BACKEND
;
# TODO check the process with pid $PID_FILE_BACKEND is really alive
return
;
}
=head2 domdisplay
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment