#!/bin/sh

ADMIN='./admin.sh --username admin --password admin --epr https://127.0.0.1:9443/services/Axis2NodeManager'

$ADMIN --operation unloadsgs --service-groups echo,version
if [ "$?" = "0" ]; then
     $ADMIN --operation commit
     if [ "$?" = "0" ]; then
        echo Successfully committed.
     else
        echo Commit failed
     fi   
else
     echo Unloading service groups failed
fi