Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
d540a4b1
Commit
d540a4b1
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Tidying
parent
bccd2443
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-restore-local
+22
-18
22 additions, 18 deletions
src/freedombone-restore-local
with
22 additions
and
18 deletions
src/freedombone-restore-local
+
22
−
18
View file @
d540a4b1
...
...
@@ -320,20 +320,21 @@ function restore_mutt_settings {
${
PROJECT_NAME
}
-adduser
$USERNAME
fi
echo
$"Restoring Mutt settings for
$USERNAME
"
restore_directory_from_usb /root/tempmutt mutt/
$USERNAME
if
[
-f
/root/tempmutt/home/
$USERNAME
/tempbackup/.muttrc
]
;
then
cp
-f
/root/tempmutt/home/
$USERNAME
/tempbackup/.muttrc /home/
$USERNAME
/.muttrc
temp_restore_dir
=
/root/tempmutt
restore_directory_from_usb
$temp_restore_dir
mutt/
$USERNAME
if
[
-f
$temp_restore_dir
/home/
$USERNAME
/tempbackup/.muttrc
]
;
then
cp
-f
$temp_restore_dir
/home/
$USERNAME
/tempbackup/.muttrc /home/
$USERNAME
/.muttrc
fi
if
[
-f
/root/tempmutt
/home/
$USERNAME
/tempbackup/Muttrc
]
;
then
cp
-f
/root/tempmutt
/home/
$USERNAME
/tempbackup/Muttrc /etc/Muttrc
if
[
-f
$temp_restore_dir
/home/
$USERNAME
/tempbackup/Muttrc
]
;
then
cp
-f
$temp_restore_dir
/home/
$USERNAME
/tempbackup/Muttrc /etc/Muttrc
fi
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
/root/tempmutt
rm
-rf
$temp_restore_dir
set_user_permissions
backup_unmount_drive
exit
276
fi
rm
-rf
/root/tempmutt
rm
-rf
$temp_restore_dir
fi
done
fi
...
...
@@ -353,15 +354,16 @@ function restore_gpg {
${
PROJECT_NAME
}
-adduser
$USERNAME
fi
echo
$"Restoring gnupg settings for
$USERNAME
"
restore_directory_from_usb /root/tempgnupg gnupg/
$USERNAME
cp
-r
/root/tempgnupg/home/
$USERNAME
/.gnupg /home/
$USERNAME
/
temp_restore_dir
=
/root/tempgnupg
restore_directory_from_usb
$temp_restore_dir
gnupg/
$USERNAME
cp
-r
$temp_restore_dir
/home/
$USERNAME
/.gnupg /home/
$USERNAME
/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
/root/tempgnupg
rm
-rf
$temp_restore_dir
set_user_permissions
backup_unmount_drive
exit
276
fi
rm
-rf
/root/tempgnupg
rm
-rf
$temp_restore_dir
if
[[
"
$USERNAME
"
==
"
$ADMIN_USERNAME
"
]]
;
then
cp
-r
/home/
$USERNAME
/.gnupg /root
if
[
!
"
$?
"
=
"0"
]
;
then
...
...
@@ -389,15 +391,16 @@ function restore_procmail {
${
PROJECT_NAME
}
-adduser
$USERNAME
fi
echo
$"Restoring procmail settings for
$USERNAME
"
restore_directory_from_usb /root/tempprocmail procmail/
$USERNAME
cp
-f
/root/tempprocmail/home/
$USERNAME
/tempbackup/.procmailrc /home/
$USERNAME
/
temp_restore_dir
=
/root/tempprocmail
restore_directory_from_usb
$temp_restore_dir
procmail/
$USERNAME
cp
-f
$temp_restore_dir
/home/
$USERNAME
/tempbackup/.procmailrc /home/
$USERNAME
/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
/root/tempprocmail
rm
-rf
$temp_restore_dir
set_user_permissions
backup_unmount_drive
exit
276
fi
rm
-rf
/root/tempprocmail
rm
-rf
$temp_restore_dir
fi
done
fi
...
...
@@ -716,14 +719,15 @@ function restore_mailing_list {
fi
if
[
-d
/var/spool/mlmmj
]
;
then
echo
$"Restoring public mailing list"
restore_directory_from_usb /root/tempmailinglist mailinglist
cp
-r
/root/tempmailinglist/root/spool/mlmmj/
*
/var/spool/mlmmj
temp_restore_dir
=
/root/tempmailinglist
restore_directory_from_usb
$temp_restore_dir
mailinglist
cp
-r
$temp_restore_dir
/root/spool/mlmmj/
*
/var/spool/mlmmj
if
[
!
"
$?
"
=
"0"
]
;
then
set_user_permissions
backup_unmount_drive
exit
526
fi
rm
-rf
/root/tempmailinglist
rm
-rf
$temp_restore_dir
fi
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment