Skip to content
Snippets Groups Projects
Commit 3b69a5b3 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

add check for security file

parent d38e687b
No related branches found
No related tags found
1 merge request!129Db Profiles
......@@ -473,12 +473,18 @@ function restoreByFile(){
h2 add security infos ...
# todo: this will fail when restoring from "deleted_databases" folder
SECURITYFILE="${ARCHIVE_DIR}/security/__security__${_sourceDB}.json"
SECDATA="$( cat $SECURITYFILE )"
color cmd
echo "add security data: $SECDATA"
_couchapi PUT "${dbname}/_security" "$SECDATA"
fetchrc
color reset
if [ -f "$SECURITYFILE" ]; then
SECDATA="$( cat $SECURITYFILE )"
color cmd
echo "add security data: $SECDATA"
_couchapi PUT "${dbname}/_security" "$SECDATA"
fetchrc
color reset
else
color warning
echo "WARNING: no security data file was found: $SECURITYFILE"
color reset
fi
echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment