diff --git a/bin/sdr-preservation-core_status.sh b/bin/sdr-preservation-core_status.sh new file mode 100755 index 0000000..d77c9d7 --- /dev/null +++ b/bin/sdr-preservation-core_status.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# The ROBOT_ENVIRONMENT values here should match the +# environment files in the shared configs at +# https://github.com/sul-dlss/sdr-configs/tree/master/sdr-preservation-core/config/environments + +if hostname | egrep -q '\-dev'; then + export ROBOT_ENVIRONMENT='integration' +fi +if hostname | egrep -q '\-test|\-stage'; then + export ROBOT_ENVIRONMENT='test' +fi +if hostname | egrep -q '\-prod'; then + export ROBOT_ENVIRONMENT='production' +fi + +echo "Using ROBOT_ENVIRONMENT=$ROBOT_ENVIRONMENT" +cd ~/sdr-preservation-core/current +bundle exec controller status