Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.18.x] Do not systemctl enable individual services #1334

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions packaging/common/cfengine-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1044,19 +1044,9 @@ if ! is_upgrade; then
if [ -x /bin/systemctl ]; then
# Reload systemd config to pick up newly installed units
/bin/systemctl daemon-reload > /dev/null 2>&1
# Enable service units
# Enabling services is OK to fail (they can be masked, for example)
set +e
/bin/systemctl enable cf-apache.service > /dev/null 2>&1
/bin/systemctl enable cf-execd.service > /dev/null 2>&1
/bin/systemctl enable cf-serverd.service > /dev/null 2>&1
/bin/systemctl enable cf-runalerts.service > /dev/null 2>&1
/bin/systemctl enable cf-monitord.service > /dev/null 2>&1
/bin/systemctl enable cf-postgres.service > /dev/null 2>&1
/bin/systemctl enable cf-hub.service > /dev/null 2>&1
/bin/systemctl enable cf-reactor.service > /dev/null 2>&1
/bin/systemctl enable cfengine3.service > /dev/null 2>&1
set -e
# Enable cfengine3 service (starts all the other services)
# Enabling the service is OK to fail (can be masked, for example)
/bin/systemctl enable cfengine3.service > /dev/null 2>&1 || true
else
case "`os_type`" in
redhat)
Expand Down
11 changes: 3 additions & 8 deletions packaging/common/cfengine-non-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,9 @@ case `os_type` in
if [ -x /bin/systemctl ]; then
# Reload systemd config to pick up newly installed units
/bin/systemctl daemon-reload > /dev/null 2>&1
# Enable service units
# Enabling services is OK to fail (they can be masked, for example)
set +e
/bin/systemctl enable cf-execd.service > /dev/null 2>&1
/bin/systemctl enable cf-serverd.service > /dev/null 2>&1
/bin/systemctl enable cf-monitord.service > /dev/null 2>&1
/bin/systemctl enable cfengine3.service > /dev/null 2>&1
set -e
# Enable cfengine3 service (starts all the other services)
# Enabling the service is OK to fail (can be masked, for example)
/bin/systemctl enable cfengine3.service > /dev/null 2>&1 || true
else
case `os_type` in
redhat)
Expand Down
Loading