mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Check for volume mount before reapplying it
This commit is contained in:
@ -259,7 +259,7 @@ echo
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fuRESTORE_EWSCFG () {
|
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"
|
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
|
sed -i '/\/opt\/ewsposter\/ews.ip/a\\ \ \ \ \ - /data/ews/conf/ews.cfg:/opt/ewsposter/ews.cfg' /opt/tpot/etc/tpot.yml
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user