Handling user agent during user files backup
This commit is contained in:
parent
d528d904cc
commit
6e5ffcc9ea
|
@ -113,6 +113,7 @@ function backup_users {
|
|||
for d in /home/*/ ; do
|
||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
||||
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
||||
gpg_agent_setup $USERNAME
|
||||
|
||||
# Backup any gpg keys
|
||||
if [ -d /home/$USERNAME/.gnupg ]; then
|
||||
|
@ -212,6 +213,8 @@ function backup_users {
|
|||
cp /home/$USERNAME/.procmailrc /home/$USERNAME/tempbackup
|
||||
backup_directory_to_usb /home/$USERNAME/tempbackup procmail/$USERNAME
|
||||
fi
|
||||
|
||||
gpg_agent_enable $USERNAME
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ function backup_users {
|
|||
for d in /home/*/ ; do
|
||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
||||
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
||||
gpg_agent_setup $USERNAME
|
||||
|
||||
# personal settings
|
||||
if [ -d /home/$USERNAME/personal ]; then
|
||||
|
@ -266,6 +267,7 @@ function backup_users {
|
|||
echo $"Backing up emails for $USERNAME"
|
||||
backup_directory_to_friend /root/backupemail/$USERNAME mail/$USERNAME
|
||||
fi
|
||||
gpg_agent_enable $USERNAME
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue