summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader
diff options
context:
space:
mode:
authorSimon Rettberg2018-04-20 13:22:28 +0200
committerSimon Rettberg2018-04-20 13:22:28 +0200
commit5de6074106e3b83890ddde64e535f8c3bfb64dea (patch)
treea30d8477edc109abdcd91b82fec651cc5d2b5904 /satellit_upgrader
parent[SSUS] Use failprint everywhere (diff)
downloadsetup-scripts-5de6074106e3b83890ddde64e535f8c3bfb64dea.tar.gz
setup-scripts-5de6074106e3b83890ddde64e535f8c3bfb64dea.tar.xz
setup-scripts-5de6074106e3b83890ddde64e535f8c3bfb64dea.zip
[SSUS] Fix systemd dropin dropping
Diffstat (limited to 'satellit_upgrader')
-rw-r--r--satellit_upgrader/updater.template.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 93638e6..dbd08ba 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -373,16 +373,16 @@ diffcp "lighttpd-include-conf-d.sh" "/usr/share/lighttpd/include-conf-d.sh" && R
# ********************** lighttpd php_children *************
mkdir -p /usr/local/sbin
-if diffcp "patch_lighttpd_phpchildren" "/usr/local/sbin/patch_lighttpd_phpchildren" "Installing script to set dynamic php children value"; then
+if diffcp "patch_lighttpd_phpchildren" "/usr/local/sbin/patch_lighttpd_phpchildren" "Installing script to set dynamic php children value" \
+ || grep -qF 'patch_lighttpd_phpchildren' "/lib/systemd/system/lighttpd.service"; then
if [ -f "/lib/systemd/system/lighttpd.service" ]; then
- # remove old patchy way
- grep -qF 'patch_lighttpd_phpchildren' "/lib/systemd/system/lighttpd.service" \
- && sed -i '/patch_lighttpd_phpchildren/d' "/lib/systemd/system/lighttpd.service"
- if ! [ -f "/etc/systemd/system/lighttpd.service.d/10-dynamic_php_children" ]; then
+ # remove old hacky way
+ sed -i '/patch_lighttpd_phpchildren/d' "/lib/systemd/system/lighttpd.service"
+ if ! [ -f "/etc/systemd/system/lighttpd.service.d/10-dynamic_php_children.conf" ]; then
echo "Adding drop-in to adjust php child count"
# TODO Unify with installer
mkdir -p /etc/systemd/system/lighttpd.service.d || perror "Could not create /etc/systemd/system/lighttpd.service.d"
- cat > "/etc/systemd/system/lighttpd.service.d/10-dynamic_php_children" <<-HDOC
+ cat > "/etc/systemd/system/lighttpd.service.d/10-dynamic_php_children.conf" <<-HDOC
[Service]
ExecStartPre=/usr/local/sbin/patch_lighttpd_phpchildren
HDOC