diff --git a/app-conf/compile.conf b/compile.conf similarity index 100% rename from app-conf/compile.conf rename to compile.conf diff --git a/compile.sh b/compile.sh index 0d8451239..e6ef84e21 100755 --- a/compile.sh +++ b/compile.sh @@ -84,6 +84,7 @@ cd ${project_root} start_script=${project_root}/scripts/start.sh stop_script=${project_root}/scripts/stop.sh +app_conf=${project_root}/app-conf # Echo the value of pwd in the script so that it is clear what is being removed. rm -rf ${project_root}/dist @@ -107,6 +108,8 @@ cp $start_script ${DIST_NAME}/bin/ cp $stop_script ${DIST_NAME}/bin/ +cp -r $app_conf ${DIST_NAME} + zip -r ${DIST_NAME}.zip ${DIST_NAME} mv ${DIST_NAME}.zip ${project_root}/dist/ diff --git a/app-conf/resolver.conf.template b/resolver.conf.template similarity index 100% rename from app-conf/resolver.conf.template rename to resolver.conf.template diff --git a/scripts/start.sh b/scripts/start.sh index 4dc016f30..b22fa6dde 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -37,10 +37,14 @@ project_root=$script_dir/../ # User could set an environmental variable, ELEPHANT_CONF_DIR, or pass an optional argument(config file path) if [ -z "$1" ]; then if [ -z "$ELEPHANT_CONF_DIR" ]; then - echo "error: Couldn't find the configuration directory." - echo "Please set env variable ELEPHANT_CONF_DIR to the configuration directory or pass the location as an argument." - print_usage - exit 1 + if [ -d "${project_root}/app-conf" ]; then + ELEPHANT_CONF_DIR=$project_root/app-conf + else + echo "error: Couldn't find the configuration directory." + echo "Please set env variable ELEPHANT_CONF_DIR to the configuration directory or pass the location as an argument." + print_usage + exit 1 + fi fi CONF_DIR="$ELEPHANT_CONF_DIR" else