about summary refs log tree commit diff stats
path: root/bin/rmuser
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rmuser')
-rwxr-xr-xbin/rmuser7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/rmuser b/bin/rmuser
index 98c697a..b7f5932 100755
--- a/bin/rmuser
+++ b/bin/rmuser
@@ -1,5 +1,4 @@
 #!/bin/sh
-set -eu
 
 if [ -z "$1" ]; then
 	printf 'Please pass a user as the first argument.\n'
@@ -7,6 +6,12 @@ if [ -z "$1" ]; then
 fi
 
 printf 'Removing user %s from the system\n' "$1"
+
+chflags nouappnd "/home/$1/.history"
+chflags nouappnd "/home/$1/.bash_history"
+
+set -e
+
 userdel -r -v "$1"
 printf 'Cleaning /var/www/users/%s\n' "$1"
 rm -rf "/var/www/users/$1"