From a39cd5a5997e76d665e571c0a750979452e1b678 Mon Sep 17 00:00:00 2001 From: apb Date: Mon, 6 Jun 2022 11:54:36 +0100 Subject: [PATCH] [mod] report --- omv/report.xq | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/omv/report.xq b/omv/report.xq index 8e616e7..e780035 100644 --- a/omv/report.xq +++ b/omv/report.xq @@ -1,3 +1,14 @@ -for $s in doc("config.xml")//sharedfolder -where starts-with($s/reldirpath,"datastore/") -return $s/reldirpath/string() \ No newline at end of file +(: OMV config tools :) +declare variable $config:= doc("config.xml"); +declare variable $folders:=$config/config/system/shares/sharedfolder; +declare variable $rsync:=$config/config/services/rsync/jobs/job; + +declare function local:datastore(){ + for $s in $folders + where starts-with($s/reldirpath,"datastore/") + let $name:= substring-after($s/reldirpath,"datastore/") + order by $name + return $name +}; + +$rsync/src \ No newline at end of file