Check for volume mount before reapplying it

This commit is contained in:
Sebastian Haderecker 2019-04-23 20:58:57 +00:00
parent 581f06e2e8
commit 0dcd0b6dc5

View file

@ -259,7 +259,7 @@ echo
}
function fuRESTORE_EWSCFG () {
if [ -f '/data/ews/conf/ews.cfg' ]; then
if [ -f '/data/ews/conf/ews.cfg' ] && ! grep 'ews.cfg' /opt/tpot/etc/tpot.yml > /dev/null; then
echo "### Restoring volume mount for ews.cfg in tpot.yml"
sed -i '/\/opt\/ewsposter\/ews.ip/a\\ \ \ \ \ - /data/ews/conf/ews.cfg:/opt/ewsposter/ews.cfg' /opt/tpot/etc/tpot.yml
fi