git://git.onelab.eu
/
myplc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2bc14d8
)
restart php-fpm if it gets configured
author
parmentelat
<thierry.parmentelat@inria.fr>
Thu, 8 Mar 2018 13:45:48 +0000
(14:45 +0100)
committer
parmentelat
<thierry.parmentelat@inria.fr>
Thu, 8 Mar 2018 13:45:48 +0000
(14:45 +0100)
plc.d/httpd
patch
|
blob
|
history
diff --git
a/plc.d/httpd
b/plc.d/httpd
index
572176d
..
48c8beb
100755
(executable)
--- a/
plc.d/httpd
+++ b/
plc.d/httpd
@@
-85,7
+85,8
@@
case "$1" in
fi
# configure php-fpm as well if present (starting with f27)
fi
# configure php-fpm as well if present (starting with f27)
- [ -d $php_fpm_dir ] && cat > $php_fpm_conf << EOF
+ if [ -d $php_fpm_dir ] ; then
+ cat > $php_fpm_conf << EOF
[www]
php_value[include_path] = $include_path
php_value[open_basedir] = $open_basedir
[www]
php_value[include_path] = $include_path
php_value[open_basedir] = $open_basedir
@@
-93,6
+94,11
@@
php_value[date.timezone] = GMT
php_value[short_open_tag] = On
php_value[memory_limit] = 80M
EOF
php_value[short_open_tag] = On
php_value[memory_limit] = 80M
EOF
+ # this is needed because otherwise, the first time
+ # we do this configuration, the service is already up
+ # and the config is usable only the second time
+ systemctl restart php-fpm
+ fi
# Disable default Listen directive
sed -i -e '/^Listen/d' $httpd_conf
# Disable default Listen directive
sed -i -e '/^Listen/d' $httpd_conf