Safely remove tox identity

This commit is contained in:
Bob Mottram 2016-05-07 16:52:58 +01:00
parent 7ca018673b
commit 24ccc4d271
1 changed files with 44 additions and 35 deletions

View File

@ -117,12 +117,21 @@ fi
# remove gpg keys # remove gpg keys
if [ -d /home/$MY_USERNAME/.gnupg ]; then if [ -d /home/$MY_USERNAME/.gnupg ]; then
shred -u /home/$MY_USERNAME/.gnupg/* shred -zu /home/$MY_USERNAME/.gnupg/*
fi fi
# remove ssh keys # remove ssh keys
if [ -d /home/$MY_USERNAME/.ssh ]; then if [ -d /home/$MY_USERNAME/.ssh ]; then
shred -u /home/$MY_USERNAME/.ssh/* shred -zu /home/$MY_USERNAME/.ssh/*
fi
# remove tox indentity
if [ -d /home/$MY_USERNAME/.config/tox ]; then
shred -zu /home/$MY_USERNAME/.config/tox/*
if [ -d /home/$MY_USERNAME/.config/tox/chatlogs ]; then
shred -zu /home/$MY_USERNAME/.config/tox/chatlogs/*
rm -rf /home/$MY_USERNAME/.config/tox/chatlogs
fi
fi fi
userdel -r $MY_USERNAME userdel -r $MY_USERNAME