HBLink3/entrypoint

20 lines
545 B
Plaintext
Raw Normal View History

2019-04-13 13:59:03 -04:00
#!/bin/sh
if [ -z "$GIT_REPO" ]; then
mkdir -p /var/tmp/config
cd /var/tmp/config
git clone https://${GIT_USER}:${GIT_PASSWORD}@${GIT_REPO}
2019-04-13 13:59:03 -04:00
DIR=$(echo ${GIT_REPO}| sed s/.git$//g | sed s#^.*/##g)
2019-04-13 13:59:03 -04:00
cp -a /var/tmp/config/${DIR}/*cfg /opt/hblink3/
cp -a /var/tmp/config/${DIR}/*csv /opt/hblink3/
cp -a /var/tmp/config/${DIR}/*json /opt/hblink3/
else
cp -a /opt/config/*cfg /opt/hblink3/
cp -a /opt/config/*csv /opt/hblink3/
cp -a /opt/config/*json /opt/hblink3/
fi
cd /opt/hblink3
python /opt/hblink3/hblink.py -c hblink.cfg