Fixes #5824: Make rudder-agent more generic

http://www.rudder-project.org/redmine/issues/5824
Why don't you build a variable with the command to run in the series of if/elif above, and at the end run exec $CMD, and re-use $CMD in the message?