Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
e1fb5ac8
Commit
e1fb5ac8
authored
Jan 01, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spiceproxy: always restart unsing HUP
To keep existing spice connections alive.
parent
024514ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
spiceproxy
bin/init.d/spiceproxy
+0
-5
spiceproxy
bin/spiceproxy
+9
-9
No files found.
bin/init.d/spiceproxy
View file @
e1fb5ac8
...
...
@@ -45,11 +45,6 @@ case "$1" in
$DAEMON
stop
log_end_msg
$?
;;
reload
)
log_daemon_msg
"Reloading
$DESC
"
"
$NAME
"
$DAEMON
reload
log_end_msg
$?
;;
restart|force-reload
)
log_daemon_msg
"Restarting
$DESC
"
"
$NAME
"
$DAEMON
restart
...
...
bin/spiceproxy
View file @
e1fb5ac8
#!/usr/bin/perl -T
# Note: In theory, all this can be done by 'pveproxy' daemon. But som
API call
#
still have blocking code, so we use a separate daemon to avoid that the console
#
get
blocked.
# Note: In theory, all this can be done by 'pveproxy' daemon. But som
e
#
API call still have blocking code, so we use a separate daemon to avoid
#
that the console gets
blocked.
$ENV
{'
PATH
'}
=
'
/sbin:/bin:/usr/sbin:/usr/bin
';
...
...
@@ -64,7 +64,9 @@ sub init {
my
(
$socket
,
$sockfd
);
if
(
defined
(
$sockfd
=
$ENV
{
PVE_DAEMON_SOCKET_3128
})
&&
my
$port
=
3128
;
if
(
defined
(
$sockfd
=
$ENV
{"
PVE_DAEMON_SOCKET_
$port
"})
&&
$self
->
{
env_restart_pve_daemon
})
{
die
"
unable to parse socket fd '
$sockfd
'
\n
"
...
...
@@ -78,7 +80,7 @@ sub init {
}
else
{
$socket
=
IO::Socket::
INET
->
new
(
LocalAddr
=>
undef
,
# all interfaces
LocalPort
=>
3128
,
LocalPort
=>
$port
,
Listen
=>
SOMAXCONN
,
Proto
=>
'
tcp
',
ReuseAddr
=>
1
)
||
...
...
@@ -88,7 +90,7 @@ sub init {
# so we disable that to maximize performance
setsockopt
(
$socket
,
IPPROTO_TCP
,
TCP_NODELAY
,
1
);
$ENV
{
PVE_DAEMON_SOCKET_3128
}
=
$socket
->
fileno
;
$ENV
{
"
PVE_DAEMON_SOCKET_
$port
"
}
=
$socket
->
fileno
;
}
# remove FD_CLOEXEC bit to reuse on exec
...
...
@@ -119,15 +121,13 @@ sub run {
}
$daemon
->
register_start_command
();
$daemon
->
register_restart_command
(
0
);
$daemon
->
register_reload_command
();
$daemon
->
register_restart_command
(
1
);
$daemon
->
register_stop_command
();
$daemon
->
register_status_command
();
my
$cmddef
=
{
start
=>
[
__PACKAGE__
,
'
start
',
[]
],
restart
=>
[
__PACKAGE__
,
'
restart
',
[]
],
reload
=>
[
__PACKAGE__
,
'
reload
',
[]
],
stop
=>
[
__PACKAGE__
,
'
stop
',
[]
],
status
=>
[
__PACKAGE__
,
'
status
',
[]
,
undef
,
sub
{
print
shift
.
"
\n
";}
],
};
...
...
Write
Preview
Markdown
is supported
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