From 5de6074106e3b83890ddde64e535f8c3bfb64dea Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 20 Apr 2018 13:22:28 +0200 Subject: [SSUS] Fix systemd dropin dropping --- satellit_upgrader/updater.template.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'satellit_upgrader') 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 -- cgit v1.2.3-55-g7522