Skip to content

Commit

Permalink
Specify a default storage location in the file-backup's configuration (
Browse files Browse the repository at this point in the history
…eclipse-kanto#34)

[eclipse-kanto#33] Specify a default storage location in the file-backup's configuration

- specify a default storage location in file-backup.conf

Signed-off-by: Hristo Bozhilov <[email protected]>
  • Loading branch information
Hristo Bozhilov authored Sep 16, 2022
1 parent 54cafcb commit 376292d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions recipes-management/file-backup/file-backup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ FB_LOG_DD ?= "${localstatedir}/log"
FB_BACKUP_DD ?= "${localstatedir}/tmp/file-backup"
# The access mode for the directory to be backed up or restored. Allowed values are: strict, scoped and lax.
FB_ACCESS_MODE ?= "scoped"
# Directory where backups and downloads will be stored
FB_STORAGE_DD ?= "${localstatedir}/lib"
1 change: 1 addition & 0 deletions recipes-management/file-backup/file-backup_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ do_install() {
sed -e 's,@FB_LOG_DD@,${FB_LOG_DD},g' \
-e 's,@FB_BACKUP_DD@,${FB_BACKUP_DD},g' \
-e 's,@FB_ACCESS_MODE@,${FB_ACCESS_MODE},g' \
-e 's,@FB_STORAGE_DD@,${FB_STORAGE_DD},g' \
-i ${D}${FB_CFG_DD}/file-backup/config.json
fi
}
3 changes: 2 additions & 1 deletion recipes-management/file-backup/files/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"logFile": "@FB_LOG_DD@/file-backup/file-backup.log",
"dir": "@FB_BACKUP_DD@",
"mode": "@FB_ACCESS_MODE@"
"mode": "@FB_ACCESS_MODE@",
"storage": "@FB_STORAGE_DD@/file-backup"
}

0 comments on commit 376292d

Please sign in to comment.