Skip to content

Commit

Permalink
Fixes #12887: fail to restart certain services on Ubuntu because of i…
Browse files Browse the repository at this point in the history
…ncomplete detection of systemd/upstart
  • Loading branch information
ncharles committed Jul 4, 2018
1 parent c9144f1 commit ad63874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tree/20_cfe_basics/ncf_lib.cf
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ bundle agent ncf_services(service, action)
};

# Due to lack of integration between upstart and init scripts, we have to make different cases.
"is_upstart_service" not => returnszero("/sbin/initctl status ${service} 2>&1 | ${paths.path[grep]} 'Unknown job' > /dev/null", "useshell"),
"is_upstart_service" not => returnszero("/sbin/initctl status ${service} 2>&1 | ${paths.path[grep]} -E 'Unknown job|Unable to connect to Upstart' > /dev/null", "useshell"),
ifvarclass => "ubuntu.initctl_utility_present";

# Due to compatibility issues when mixing init.d/service and systemctl calls, we use the init script when present
Expand Down

0 comments on commit ad63874

Please sign in to comment.