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
2ba2236b
Commit
2ba2236b
authored
Mar 03, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly create /var/run/pveproxy at startup
parent
155324da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
pveproxy
bin/pveproxy
+5
-4
spiceproxy
bin/spiceproxy
+8
-1
No files found.
bin/pveproxy
View file @
2ba2236b
...
...
@@ -49,10 +49,11 @@ my %daemon_options = (
);
my
$
rundir
=
"/var/run/pveproxy"
;
mkdir
($
rundir
,
0700
);
my
$
gid
=
getgrnam
(
'www-data'
)
||
die
"getgrnam failed - $!
\n
"
;
my
$
uid
=
getpwnam
(
'www-data'
)
||
die
"getpwnam failed - $!
\n
"
;
chown
($
uid
,
$
gid
,
$
rundir
);
if
(
mkdir
($
rundir
,
0700
))
{
#
only
works
at
first
start
if
we
are
root
)
my
$
gid
=
getgrnam
(
'www-data'
)
||
die
"getgrnam failed - $!
\n
"
;
my
$
uid
=
getpwnam
(
'www-data'
)
||
die
"getpwnam failed - $!
\n
"
;
chown
($
uid
,
$
gid
,
$
rundir
);
}
my
$
daemon
=
__PACKAGE__
->
new
(
'pveproxy'
,
$
cmdline
,
%
daemon_options
);
...
...
bin/spiceproxy
View file @
2ba2236b
...
...
@@ -38,7 +38,14 @@ my %daemon_options = (
setuid
=>
'
www-data
',
setgid
=>
'
www-data
',
pidfile
=>
'
/var/run/pveproxy/spiceproxy.pid
',
);
);
my
$rundir
=
"
/var/run/pveproxy
";
if
(
mkdir
(
$rundir
,
0700
))
{
# only works at first start if we are root)
my
$gid
=
getgrnam
('
www-data
')
||
die
"
getgrnam failed - $!
\n
";
my
$uid
=
getpwnam
('
www-data
')
||
die
"
getpwnam failed - $!
\n
";
chown
(
$uid
,
$gid
,
$rundir
);
}
my
$daemon
=
__PACKAGE__
->
new
('
spiceproxy
',
$cmdline
,
%
daemon_options
);
...
...
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