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

SIPX-824: Fix proper location of new CFEngine binaries #148

Open
wants to merge 7 commits into
base: release-20.04-centos7
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions sipXconfig/etc/reset_cfkey.cf
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ bundle agent reset_cfkey_do {

commands:
have_keys_to_reset::
"/usr/sbin/cf-key"
"/usr/local/sbin/cf-key"
comment => "Deleting cfkey for root user",
args => "-r $(sipx.reset_cfkeys)";

"/usr/sbin/cf-key"
"/usr/local/sbin/cf-key"
comment => "Deleting cfkey for $(sipx.user) user",
args => "-r $(sipx.reset_cfkeys)",
contain => su("$(sipx.SIPXPBXUSER)");
Expand Down
4 changes: 2 additions & 2 deletions sipXsupervisor/bin/sipxagent.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def run(verbose, is_remote, is_raw, hosts, defines, undefines, bundles)
analyzer = (is_raw ? '' : "| #{$bindir}/sipxagent-log-reader #{vstr}")

if (is_remote || Process.uid != 0)
ok = cmd(verbose, "/usr/sbin/cf-runagent -t #{$timeout} -v #{hstr} -f #{$cfinputs}/sipxagent.cf -o \"#{agentstr} -K\" | tee -a #{$logfile} #{analyzer}")
ok = cmd(verbose, "/usr/local/sbin/cf-runagent -t #{$timeout} -v #{hstr} -f #{$cfinputs}/sipxagent.cf -o \"#{agentstr} -K\" | tee -a #{$logfile} #{analyzer}")
else
# Short-cut - If you're root and you're not remote, do not bother going thru
# sipxsupervisor. This is handy if supervisor is dead or in the very initial
# call to sipxecs-setup on primary when nothing is running yet
ok = cmd(verbose, "/usr/sbin/cf-agent #{agentstr} -IKf #{$cfinputs}/promises.cf | tee -a #{$logfile} #{analyzer}");
ok = cmd(verbose, "/usr/local/sbin/cf-agent #{agentstr} -IKf #{$cfinputs}/promises.cf | tee -a #{$logfile} #{analyzer}");
FileUtils.chown($user, $group, $logfile)
end
end
Expand Down
4 changes: 2 additions & 2 deletions sipXsupervisor/bin/sipxecs-setup.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ end

def set_root_keys
#harmless if re-run
exit 1 unless run_command "/usr/sbin/cf-key"
exit 1 unless run_command "/usr/local/sbin/cf-key"
end

def set_nonroot_keys
#harmless if re-run
exit 1 unless run_command "su - #{$user} sh -c '/usr/sbin/cf-key'"
exit 1 unless run_command "su - #{$user} sh -c '/usr/local/sbin/cf-key'"
end

def disable_selinux
Expand Down
2 changes: 1 addition & 1 deletion sipXsupervisor/bin/sipxsupervisor.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
. @SIPX_LIBEXECDIR@/sipx-utils.sh || { echo_failure; echo; exit $ENOENT; }

config="@SIPX_CFINPUTS@/sipxsupervisord.cf"
exec="/usr/sbin/cf-serverd"
exec="/usr/local/sbin/cf-serverd"
prog=$(basename $exec)
progName="cf-serverd"
# used to tell which config is in use.
Expand Down
2 changes: 1 addition & 1 deletion sipXsupervisor/etc/commands.cf.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bundle agent last_seen_report {

commands:
any::
"/usr/sbin/cf-report"
"/usr/local/sbin/cf-report"
args => "-IKvf @SIPX_CFINPUTS@/plugin.d/lib/commands.cf";
}

Expand Down
2 changes: 1 addition & 1 deletion sipXsupervisor/etc/sipxsupervisor.cf
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ bundle agent sipxsupervisor_setup {
bundle agent sipxsupervisor_running {
vars:
any::
"service_command" string => "/usr/sbin/cf-serverd";
"service_command" string => "/usr/local/sbin/cf-serverd";

methods:
any::
Expand Down
4 changes: 2 additions & 2 deletions sipXsupervisor/etc/sipxsupervisord.cf.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ body server control {
maxconnections => "5";
trustkeysfrom => { @(sipx.allowed_addrs) };
logallconnections => "true";
cfruncommand => "/usr/sbin/cf-agent -Kvf @SIPX_CFINPUTS@/promises.cf";
cfruncommand => "/usr/local/sbin/cf-agent -Kvf @SIPX_CFINPUTS@/promises.cf";
allowusers => { @(sipx.allowed_users) };
}

Expand All @@ -51,7 +51,7 @@ body agent control {
bundle server access_rules {
vars:
"export_dirs" slist => {
"/usr/sbin/cf-agent",
"/usr/local/sbin/cf-agent",
"@SIPX_CFDATA@",
"@SIPX_LOGDIR@",
"@SIPX_VARDIR@/tmp",
Expand Down