Commit ce3a80c2 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

remove index conf and reindex from autostart

parent 9ccca840
Pipeline #130747 passed with stages
in 3 minutes and 51 seconds
xquery version "3.1";
let $doc := doc( "/db/system/config/db/sade-projects/textgrid/data/xml/data/collection.xconf" )/*
let $tmp := xmldb:store( "/db", "tmp-collection.xconf", $doc )
let $newdoc := doc( $tmp )
let $log := util:log-system-out("Autostart: »Hello.«")
let $credentials :=
file:read("/var/lib/textgrid/fontane/credentials.txt")
=> tokenize("\n")
let $credentials := file:read("/var/lib/textgrid/fontane/credentials.txt") => tokenize("\n")
let $configdoc := doc("/db/sade-projects/textgrid/config.xml")
let $credentialInjection :=
for $line at $pos in $credentials
......@@ -21,11 +15,7 @@ let $credentialInjection :=
case 4 return update replace $configdoc//param[@key="dokuwiki.user"]/text() with text {$line}
case 5 return update replace $configdoc//param[@key="dokuwiki.password"]/text() with text {$line}
default return false()
let $passwd := sm:passwd("admin", $credentials[3])
let $setpasswd := sm:passwd("admin", $credentials[3])
return
(
xmldb:remove( "/db/system/config/db/sade-projects/textgrid/data/xml/data", "collection.xconf"),
xmldb:store( "/db/system/config/db/sade-projects/textgrid/data/xml/data", "collection.xconf", $newdoc ),
xmldb:remove( "/db", "tmp-collection.xconf" )
) , xmldb:reindex("/db/sade-projects/textgrid/data/xml/data")
true()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment