Valid user

This commit is contained in:
Bob Mottram 2016-11-06 14:31:23 +00:00
parent fbef3d521e
commit 87baedc1ee
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@
function enable_email_encryption_at_rest {
for d in /home/*/ ; do
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
if grep '#/usr/bin/gpgit.pl' /home/$USERNAME/.procmailrc; then
sed -i 's|#/usr/bin/gpgit.pl|/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc
fi
@ -46,7 +46,7 @@ function enable_email_encryption_at_rest {
function disable_email_encryption_at_rest {
for d in /home/*/ ; do
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
if ! grep '#/usr/bin/gpgit.pl' /home/$USERNAME/.procmailrc; then
sed -i 's|/usr/bin/gpgit.pl|#/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc
fi