kills resident users when del option is used

This commit is contained in:
Bruno TATU 2020-02-10 11:44:35 +01:00
parent 234ac67634
commit 5c2a3d79ce
1 changed files with 6 additions and 0 deletions

View File

@ -717,8 +717,14 @@ op_del() {
set -x
if [ "$WEB_SERVER" == "apache" ]; then
if ps -u www-"$login" >/dev/null ; then
killall -s SIGKILL -u www-"$login"
fi
userdel www-"$login"
fi
if ps -u "$login" >/dev/null ; then
killall -s SIGKILL -u "$login"
fi
userdel "$login"
for php_version in "${PHP_VERSIONS[@]}"; do
lxc-attach -n php"${php_version}" -- userdel -f www-"$login"