RYSEN/entrypoint

20 lines
545 B
Bash
Executable File

#!/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}
DIR=$(echo ${GIT_REPO}| sed s/.git$//g | sed s#^.*/##g)
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