This has been driving me completely batty, and none of the Java/Groovy gurus on the dev list can figure it out either (I've spent days trying to get what I thought was something simple to work! Grrr).
When trying to call the /reload-config command from Groovy (Java) on FileZilla Server it fails, in weird and not so wonderful ways.
I'm getting a return code of '1' for /reload-config (fail)
but...
if I change it to /stop or /start -- all works as it should.
I'm trying to add new user accounts to Server by changing the FileZilla Server.xml file, and then wanted to reload these settings.
Groovy code:
Code: Select all
def ant = new AntBuilder()
ant.exec( outputproperty:"cmdOut",
errorproperty: "cmdErr",
resultproperty:"cmdExit",
failonerror: "false",
dir: "c:\\Program Files\\FileZilla Server",
executable: 'cmd.exe'
)
{
// /reload-config fails, while /start and /stop work ok
arg( line: """/c "FileZilla Server.exe" /reload-config""" )
}
println "return code: ${ant.project.properties.cmdExit}"
println "stderr: ${ant.project.properties.cmdErr}"
println "stdout: ${ant.project.properties.cmdOut}"
Any flashes of brilliance would be hugely appreciated!
Cheers,
-Chris