Skip to content
Snippets Groups Projects
Verified Commit df527b15 authored by David Hoese's avatar David Hoese
Browse files

Try to make scripts relative to ENV

parent a13ceb96
No related branches found
No related tags found
No related merge requests found
#!/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
......
[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
......
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment