diff --git a/src/freedombone-app-bdsmail b/src/freedombone-app-bdsmail index 46c6b6c8..f02fc27a 100755 --- a/src/freedombone-app-bdsmail +++ b/src/freedombone-app-bdsmail @@ -42,6 +42,10 @@ function bdsmail_configure_users { for d in /home/*/ ; do USERNAME=$(echo "$d" | awk -F '/' '{print $3}') if [[ $(is_valid_user "$USERNAME") == "1" ]]; then + + # Add the user to the i2p group + usermod -a -G i2psvc $USERNAME + if [ -f /home/$USERNAME/.muttrc ]; then # Create a mutt i2p folder if ! grep -q ' =i2p' /home/$USERNAME/.muttrc; then @@ -199,18 +203,12 @@ function remove_bdsmail { rm /etc/systemd/system/bdsmail.service fi - remove_i2p - remove_app bdsmail - remove_completion_param install_bdsmail - sed -i '/bdsmail/d' $COMPLETION_FILE - rm -rf /etc/skel/.mutt - if [ -d /etc/bdsmail ]; then - rm -rf /etc/bdsmail - fi - for d in /home/*/ ; do USERNAME=$(echo "$d" | awk -F '/' '{print $3}') if [[ $(is_valid_user "$USERNAME") == "1" ]]; then + # remove the user from the i2p group + deluser $USERNAME i2psvc + # Remove mutt folder hook to the i2p config if [ -f /home/$USERNAME/.muttrc ]; then if grep -q 'folder-hook !i2p' /home/$USERNAME/.muttrc; then @@ -230,6 +228,15 @@ function remove_bdsmail { # or just be reinstalling the system without losing mail fi done + + remove_i2p + remove_app bdsmail + remove_completion_param install_bdsmail + sed -i '/bdsmail/d' $COMPLETION_FILE + rm -rf /etc/skel/.mutt + if [ -d /etc/bdsmail ]; then + rm -rf /etc/bdsmail + fi } function install_bdsmail {