diff --git a/etc/postinst.in b/etc/postinst.in index dfb6f585a..f37f59f7d 100755 --- a/etc/postinst.in +++ b/etc/postinst.in @@ -14,7 +14,7 @@ mkdir -p @MAXSCALE_VARDIR@/cache/maxscale mkdir -p @MAXSCALE_VARDIR@/run/maxscale # Create MaxScale user -if [ -f "/etc/passwd" -a "$(grep -c 'maxscale' /etc/passwd)" -eq 0 ] +if [ -f "/etc/passwd" ] && [ "$(grep -c 'maxscale' /etc/passwd)" -eq 0 ] then useradd -r -U -s /bin/false maxscale fi @@ -44,7 +44,7 @@ else echo "Could not find ldconfig file: @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.conf" >& 2 fi -if [-f @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service ] +if [ -f @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service ] then if [ -d "/lib/systemd/system" ] then