#!/bin/bash

svc_cmd='/usr/bin/svcquery'
service_list=`$svc_cmd -l`
for i in $service_list
do
    stopable=`$svc_cmd -i $i | grep "stopable" | cut -f2 -d'"'`
    if [ $stopable == '1' ]; then
	stopCmd=`$svc_cmd -i $i | grep "stopCmd" | cut -f2 -d'"'`
	$stopCmd
    fi
done
