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