diff --git a/scripts/archive_ceilo.sh b/scripts/archive_ceilo.sh index a927a35b07d8a91216df86c72a7925811acd8082..3f0d4e600117aca05b3f590c8c9e500b1d645020 100755 --- a/scripts/archive_ceilo.sh +++ b/scripts/archive_ceilo.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash # Moves ceilometer data in raw (inst-data) and cache -ENV=/opt/metobs/aoss_ceilo +SCRIPT_HOME="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# Assumes this script is in /opt/*/aoss_ceilo*/repos/git/AossCeilo/scripts/ +ENV="$(realpath $(realpath ${SCRIPT_HOME})/../../../../)" LOGDIR=$ENV/log LOCK=$ENV/lock/$(basename $0).lock diff --git a/scripts/ceilo_ingest.cfg b/scripts/ceilo_ingest.cfg index 07017624f5b64eff389d7f34b897e8aeab5f5bf9..77e792a91bf0c4ca74c938acefab30db54f45d2f 100644 --- a/scripts/ceilo_ingest.cfg +++ b/scripts/ceilo_ingest.cfg @@ -1,3 +1,6 @@ +[DEFAULT] +root_log_dir = /opt/metobs/aoss_ceilo/log +log_file = $(root_log_dir)s/ceilo_ingest.log [ct25k] # settings: 24007E1 @@ -46,7 +49,7 @@ formatter = generic # size 20M #} class = handlers.WatchedFileHandler -args = ('/opt/metobs/aoss_ceilo/log/ceilo_ingest.log','a') +args = (%(log_file)s,'a') level = NOTSET formatter = generic diff --git a/scripts/start_ceilo_ingest.sh b/scripts/start_ceilo_ingest.sh index c5c7bab0efb8208a8495fe8c2ed1aff601465d8a..0252fa744aa04bebadbc39a2feb96c2c009406b3 100755 --- a/scripts/start_ceilo_ingest.sh +++ b/scripts/start_ceilo_ingest.sh @@ -1,9 +1,13 @@ #!/usr/bin/env bash +SCRIPT_HOME="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# Assumes this script is in /opt/*/aoss_ceilo*/repos/git/AossCeilo/scripts/ +ENV="$(realpath $(realpath ${SCRIPT_HOME})/../../../../)" + NAME=ceilo_ingest SCRN=$(screen -list | grep $NAME | awk '{print $1}') if [ -n "$SCRN" ]; then echo Screen already running: $SCRN else -screen -S $NAME -d -m /opt/metobs/aoss_ceilo/bin/python -m aossceilo.ingest -c /opt/metobs/aoss_ceilo/repos/git/AossCeilo/scripts/$NAME.cfg +screen -S $NAME -d -m ${ENV}/bin/python -m aossceilo.ingest -c ${ENV}/repos/git/AossCeilo/scripts/$NAME.cfg echo Started in screen $(screen -list | grep $NAME | awk '{print $1}') fi