Skip to content

Commit

Permalink
Merge pull request #1332 from vpodzime/master-enable_cfengine3_only
Browse files Browse the repository at this point in the history
Do not `systemctl enable` individual services
  • Loading branch information
vpodzime authored Nov 8, 2023
2 parents b955d9b + f53a8f1 commit fe4649f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
16 changes: 3 additions & 13 deletions packaging/common/cfengine-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1061,19 +1061,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 @@ -71,14 +71,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

0 comments on commit fe4649f

Please sign in to comment.