#!/usr/bin/env bash
# This script passes the service dependent SERVICE_HOME to the common service script to run the command
                                                                                                                                       
# Check AWS_AUTO_SCALING_HOME
if [ -z "${AWS_AUTO_SCALING_HOME}" ]; then
        echo AWS_AUTO_SCALING_HOME is not set
        exit 1
fi
                                                                                                                                       
export SERVICE_HOME=${AWS_AUTO_SCALING_HOME}
                                                                                                                                       
exec "${AWS_AUTO_SCALING_HOME}/bin/service" "$@"

