Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Oct 30, 2023
1 parent 59d1659 commit ae35f83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion functions/10_check-reboot-needed
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function checkRebootNeeded
{
if [ "$OS_FAMILY" == "Redhat" ] && [ -f "/usr/bin/needs-restarting" ];then
# If following command does not return 0 then reboot is required
if ! /usr/bin/needs-restarting -r 2> /dev/null;then
if ! /usr/bin/needs-restarting -r > /dev/null;then
REBOOT_REQUIRED="true"
fi
fi
Expand Down
10 changes: 5 additions & 5 deletions mods-available/agent/reposerver.agent
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function checkRestartNeeded

# Sending general informations
function send_general_status {
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-general-status 2> /dev/null
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-general-status > /dev/null
if [ $? != "0" ];then
echo -e "An error occured while sending data\n"
else
Expand All @@ -85,9 +85,9 @@ function send_general_status {
# Sending full events history
function send_full_history {
if [ "$MAX_HISTORY" -gt "0" ];then
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history $MAX_HISTORY 2> /dev/null
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history $MAX_HISTORY > /dev/null
else
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history 2> /dev/null
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history > /dev/null
fi
if [ $? != "0" ];then
echo -e "An error occured while sending data\n"
Expand All @@ -98,7 +98,7 @@ function send_full_history {

# Sending packages status
function send_packages_status {
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-packages-status 2> /dev/null
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-packages-status > /dev/null
if [ $? != "0" ];then
echo -e "An error occured while sending data\n"
else
Expand All @@ -108,7 +108,7 @@ function send_packages_status {

# Sending full status
function send_full_status {
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-status 2> /dev/null
/opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-status > /dev/null
if [ $? != "0" ];then
echo -e "An error occured while sending data\n"
else
Expand Down
2 changes: 1 addition & 1 deletion mods-available/reposerver.mod
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function testConnection
CURL_PARAMS="\"id\":\"$HOST_ID\", \"token\":\"$TOKEN\""
fi

if ! curl -L --post301 -s -q -H "Content-Type: application/json" -X GET -d "{$CURL_PARAMS}" "${REPOSERVER_URL}/api/v2/status" 2> /dev/null;then
if ! curl -L --post301 -s -q -H "Content-Type: application/json" -X GET -d "{$CURL_PARAMS}" "${REPOSERVER_URL}/api/v2/status" > /dev/null;then
echo -e " [$YELLOW ERROR $RESET] Cannot reach reposerver from ${YELLOW}${REPOSERVER_URL}${RESET}"
ERROR_STATUS=1
clean_exit
Expand Down

0 comments on commit ae35f83

Please sign in to comment.