Merge pull request #1198 from 3onyc/fix-preinst
Check web_config before key_file (Fixes #1196)
This commit is contained in:
commit
f86a6704bd
1 file changed
+13
-14
Vendored
+13
-14
@@ -5,21 +5,8 @@ set -e
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install)
|
install)
|
||||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
|
||||||
db_get "dokku/key_file"
|
|
||||||
if [ ! -f "$RET" ]; then
|
|
||||||
echo "Error: keyfile '$RET' not found."
|
|
||||||
echo " you can enter a new keyfile path when you restart the installation."
|
|
||||||
db_reset "dokku/key_file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
db_get "dokku/web_config"
|
db_get "dokku/web_config"
|
||||||
if [ "$RET" = "false" ]; then
|
if [ "$RET" = "true" ]; then
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
INIT_CONF="/etc/init/dokku-installer.conf"
|
INIT_CONF="/etc/init/dokku-installer.conf"
|
||||||
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
|
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
|
||||||
|
|
||||||
@@ -40,6 +27,18 @@ case "$1" in
|
|||||||
|
|
||||||
rm -f /etc/nginx/sites-enabled/*
|
rm -f /etc/nginx/sites-enabled/*
|
||||||
service nginx reload
|
service nginx reload
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||||
|
db_get "dokku/key_file"
|
||||||
|
if [ ! -f "$RET" ]; then
|
||||||
|
echo "Error: keyfile '$RET' not found."
|
||||||
|
echo " you can enter a new keyfile path when you restart the installation."
|
||||||
|
db_reset "dokku/key_file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
upgrade)
|
upgrade)
|
||||||
|
|||||||
Reference in new issue
Block a user