Merge pull request #2928 from silverfix/patch-1
fix: do not overwrite the VHOST file during installation if it exists
This commit is contained in:
16
debian/postinst
vendored
16
debian/postinst
vendored
@@ -100,12 +100,18 @@ case "$1" in
|
||||
exit 0
|
||||
fi
|
||||
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" > "${DOKKU_ROOT}/VHOST"
|
||||
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
||||
echo "VHOST file detected, skipping modification"
|
||||
else
|
||||
rm -f "${DOKKU_ROOT}/VHOST"
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "Setting VHOST contents to $RET"
|
||||
echo "$RET" > "${DOKKU_ROOT}/VHOST"
|
||||
else
|
||||
echo "VHOST disabled via debconf, removing"
|
||||
rm -f "${DOKKU_ROOT}/VHOST"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/hostname"
|
||||
|
||||
Reference in New Issue
Block a user