#!/bin/sh

# Re-starts any installed Zeus programs

# calculate ZEUSHOME and export
cd `dirname $0`
ZEUSHOME=`pwd`
export ZEUSHOME

# Give suitable (C) message
echo "Restarting Riverbed Application Framework."
echo "Copyright (C) 2013, Riverbed Technology, Inc. All rights reserved"

STATUS=0

for a in stop start
do
    for i in rc.d/S*
    do
        if [ ! -f $i ]; then continue; fi
        $i $a
        if [ $? != 0 ]; then
            STATUS=1
        fi
    done
done

exit $STATUS
