Valid user
This commit is contained in:
parent
fbef3d521e
commit
87baedc1ee
|
@ -31,7 +31,7 @@
|
||||||
function enable_email_encryption_at_rest {
|
function enable_email_encryption_at_rest {
|
||||||
for d in /home/*/ ; do
|
for d in /home/*/ ; do
|
||||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
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
|
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
|
sed -i 's|#/usr/bin/gpgit.pl|/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc
|
||||||
fi
|
fi
|
||||||
|
@ -46,7 +46,7 @@ function enable_email_encryption_at_rest {
|
||||||
function disable_email_encryption_at_rest {
|
function disable_email_encryption_at_rest {
|
||||||
for d in /home/*/ ; do
|
for d in /home/*/ ; do
|
||||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
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
|
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
|
sed -i 's|/usr/bin/gpgit.pl|#/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue