adding unsubscribe from mailing list to rmuser

This commit is contained in:
Blade of Darkness 2019-12-01 18:05:23 +00:00
parent 01818e1a25
commit 4cc31809f4
1 changed files with 5 additions and 0 deletions

5
rmuser
View File

@ -1,7 +1,12 @@
#!/bin/bash
LIST_NAME="thunix-join@lists.tildeverse.org"
echo "This will remove user account $1 from Thunix."
echo "It is assumed the user account has been un-enforced in Ansible as well."
echo "Unsubscribe from this list..."
echo "From: $1 Subject: unsubscribe " | sudo -u $1 mail $LIST_NAME
echo "Killing user processes..."
sudo pkill -9 -U $1