mirror of
https://github.com/ShaYmez/hblink3.git
synced 2024-11-16 05:01:52 -05:00
20 lines
545 B
Bash
Executable File
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
|