diff options
author | Aaron Ball <nullspoon@iohq.net> | 2016-10-07 17:08:35 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2016-10-07 17:08:35 -0600 |
commit | f54bec1d941536dcf948f1b7083be924eb3a0f82 (patch) | |
tree | 342f90a4cb737fc8c4ffd74ed40a116052fb372a | |
parent | 6b77d11ab74ecc5d30324b8f64444c3bee479eda (diff) | |
download | andbackup-f54bec1d941536dcf948f1b7083be924eb3a0f82.tar.gz andbackup-f54bec1d941536dcf948f1b7083be924eb3a0f82.tar.xz |
Restore SELinux restore labels
Restoring the data does not restore the selinux contexts defined in
/file_contexts (oops). This caused restored applications to force close
when opened, with an error indicating the database could not be opened.
Add restorecon call to restore selinux contexts after restoring the
data.
-rwxr-xr-x[-rw-r--r--] | andbackup.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/andbackup.sh b/andbackup.sh index a93ae52..2093832 100644..100755 --- a/andbackup.sh +++ b/andbackup.sh @@ -123,6 +123,8 @@ function restore_app { cp -rp ${backups}/${app}/data/* ${data}/ # Fix data permissions chown -R ${owner}:${owner} ${data} + # Fix selinux labels + restorecon -R ${data} # Cleanup the extracted data so restores don't take too much space rm -rf ${backups}/${app}/data |