Skip to content

Commit

Permalink
Merge pull request #11077 from neo4j/3.2-fix-deb-preinst-error
Browse files Browse the repository at this point in the history
 Fixed error during upgrade from 3.1 on Debian
  • Loading branch information
spacecowboy committed Feb 21, 2018
2 parents 2cd85ac + 9f1e55e commit 7414bcf
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions new-packaging/src/debian/package.preinst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

set -e

NEO4J_LIB_DIR=/var/lib/neo4j
NEO4J_DATA_DIR=/var/lib/neo4j/data

OLD_PLUGINS_LINK=/var/lib/neo4j/plugins
OLD_PLUGINS_DIR=/usr/share/neo4j/plugins
OLD_IMPORT_DIR=/var/lib/data/import
Expand All @@ -22,8 +19,8 @@ case "$1" in
# Migrate variables defined in defaults file to systemd
# overrides only if the system has systemd and no overrides
# exists yet (they can be named anything in the dir)
if [ $(which systemctl) ] && [ -r /etc/default/neo4j ] && ! [ -d "${NEO4J_OVERRIDE_DIR}" ]; then
(
if which systemctl >/dev/null && [ -r /etc/default/neo4j ] && ! [ -d "${NEO4J_OVERRIDE_DIR}" ]; then

. /etc/default/neo4j

# Only do it if something was actually defined in it
Expand All @@ -37,7 +34,7 @@ case "$1" in
[ -n "${NEO4J_SHUTDOWN_TIMEOUT}" ] && echo "TimeoutSec=${NEO4J_SHUTDOWN_TIMEOUT}" >> ${NEO4J_OVERRIDE_FILE}
[ -n "${NEO4J_USER}" ] && echo "User=${NEO4J_USER}" >> ${NEO4J_OVERRIDE_FILE}
fi
)

fi
case "$2" in
2.*)
Expand Down Expand Up @@ -79,4 +76,4 @@ case "$1" in
;;
esac
;;
esac
esac

0 comments on commit 7414bcf

Please sign in to comment.