Project

General

Profile

« Previous | Next » 

Revision ae321f3e

Added by Alexis Mousset about 6 years ago

Fixes #11936: When rudder agent disable fails it prints a success message

View differences:

share/commands/agent-disable
touch /opt/rudder/etc/disable-agent
[ $? -ne 0 ] && printf "${RED}error${NORMAL}: Rudder agent could not be disabled.\n" && exit 1
[ "$QUIET" = false ] && printf "${GREEN}ok${NORMAL}: Rudder agent is now disabled.\n"
if [ "${STOP}" = "y" ]; then
rudder agent stop "${OPTIONS}"
share/commands/agent-enable
done
rm -f /opt/rudder/etc/disable-agent
[ $? -ne 0 ] && printf "${RED}error${NORMAL}: Rudder agent could not be enabled.\n" && exit 1
if [ "${START}" = "y" ]
then
[ "$QUIET" = false ] && printf "${GREEN}ok${NORMAL}: Rudder agent has been enabled.\n"

Also available in: Unified diff