Commit 593e0d04 authored by iSergio's avatar iSergio
Browse files

New undeploy script

parent 03d02fdc
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
#!/bin/sh
CONTROLLER=__CONTROLLER__:9999

VERBOSE=false

DOTSTRING="..............................................................................."
function align_left() {
    local chars="$1"
    local str="${@:2}"
    echo -n ${str}${chars:${#str}}
}

if [[ $VERBOSE == false ]]; then
    result=`jboss-cli.sh --controller=$CONTROLLER --connect --commands="undeploy "\""$1"\"" --all-relevant-server-groups" 2>&1`
else
    jboss-cli.sh --controller=$CONTROLLER --connect --commands="deploy "\""$1"\"" --all-relevant-server-groups"
fi
exit_code=$?
align_left "$DOTSTRING" "$1"