Skip to content

Commit

Permalink
Fixes #37561 - make sure katello-tracer-upload can run without sudo (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernhard authored Jun 17, 2024
1 parent 6351876 commit 94445d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/foreman/job_templates/resolve_traces.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ reboot = commands.delete('reboot')
shutdown -r +1
<% else -%>
<%= commands.join("\n") %>
sudo katello-tracer-upload
RUN_TRACER_CMD='katello-tracer-upload'
if [ "$(id -u)" -ne 0 ]; then
RUN_TRACER_CMD='sudo katello-tracer-upload'
fi
$RUN_TRACER_CMD
<% end %>

0 comments on commit 94445d2

Please sign in to comment.