Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
immerda
Puppet Modules
webhosting
Commits
f8bf8915
Commit
f8bf8915
authored
Mar 23, 2020
by
mh
Browse files
we get the user from the starter file
parent
21a290b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
files/update_scripts/update_smfs_webhostings.sh
View file @
f8bf8915
...
...
@@ -41,7 +41,7 @@ function update_smf {
smf
=
$1
basesmfdir
=
$basedir
/
$smf
starterfile
=
"/var/www/mod_fcgid-starters/
${
smf
}
/
${
smf
}
-starter"
fpmfile
=
"/
etc/php-fpm.d/
${
smf
}
.conf
"
fpmfile
=
"/
run/fpm-
${
smf
}
-socket/0.socket
"
wwwdir
=
$basesmfdir
/www
if
[
!
-f
"
${
wwwdir
}
/SSI.php"
]
;
then
abort
"SMF
${
smf
}
does not really seem to be an smf!"
...
...
@@ -51,7 +51,11 @@ function update_smf {
fi
ftpuser
=
$(
stat
-c
%U
$wwwdir
)
runuser
=
$(
stat
-c
%U
$starterfile
)
if
[
-f
$fpmfile
]
;
then
runuser
=
$(
stat
-c
%U
$fpmfile
)
else
runuser
=
$(
stat
-c
%U
$starterfile
)
fi
echo
"Updating
${
smf
}
"
find
${
wwwdir
}
-user
${
runuser
}
-print0
| xargs
--no-run-if-empty
-0
chmod
g+w
...
...
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