From e3dc97d6d4b2e262cd046d83790268799842645f Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 22 Sep 2021 10:31:49 +0200 Subject: [PATCH] delete users even though it has some processes running --- scripts/web-add-nginx.sh | 2 +- scripts/web-add.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/web-add-nginx.sh b/scripts/web-add-nginx.sh index 21e1972..a89f3e3 100755 --- a/scripts/web-add-nginx.sh +++ b/scripts/web-add-nginx.sh @@ -388,7 +388,7 @@ op_del() { set -x deluser www-data $login - userdel $login + userdel -f $login groupdel $login sed -i.bak "/^$login:/d" /etc/aliases diff --git a/scripts/web-add.sh b/scripts/web-add.sh index 6150828..a4461b4 100755 --- a/scripts/web-add.sh +++ b/scripts/web-add.sh @@ -725,9 +725,9 @@ op_del() { set -x if [ "$WEB_SERVER" == "apache" ]; then - userdel www-"$login" + userdel -f www-"$login" fi - userdel "$login" + userdel -f "$login" for php_version in "${PHP_VERSIONS[@]}"; do lxc-attach -n php"${php_version}" -- userdel -f www-"$login" lxc-attach -n php"${php_version}" -- userdel -f "$login"