make jail mounts work with all file system devices
This commit is contained in:
parent
59db6719db
commit
30c93cc910
|
@ -54,7 +54,7 @@ if [[ -f /etc/varnish/sites.d/$domain.vcl ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if virtualhost is mounted in a jail, unmount it
|
# if virtualhost is mounted in a jail, unmount it
|
||||||
if grep -q "^/dev/sda /usr/jails/$username/srv/www/$domain " /etc/mtab; then
|
if grep -q " /usr/jails/$username/srv/www/$domain " /etc/mtab; then
|
||||||
umount /usr/jails/$username/srv/www/$domain
|
umount /usr/jails/$username/srv/www/$domain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
# check for jailed vhost mount
|
# check for jailed vhost mount
|
||||||
if /bin/grep -q "^/dev/sda /usr/jails/$username/srv/www/" /etc/mtab; then
|
if /bin/grep -q " /usr/jails/$username/srv/www/" /etc/mtab; then
|
||||||
echo user \"$username\" has one or more jailed vhosts mounted
|
echo user \"$username\" has one or more jailed vhosts mounted
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -70,7 +70,7 @@ if [[ -f "/etc/php/$phpVersion/fpm/pool.d/$username.conf" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if users home dir is mounted in a jail, unmount it
|
# if users home dir is mounted in a jail, unmount it
|
||||||
if grep -q "^/dev/sda /usr/jails/$username/home/$username " /etc/mtab; then
|
if grep -q " /usr/jails/$username/home/$username " /etc/mtab; then
|
||||||
umount /usr/jails/$username/home/$username
|
umount /usr/jails/$username/home/$username
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user