Page 1 of 1

Create a DOMAIN on server by LUA script

Posted: Thu Oct 17, 2013 2:13 pm
by kirikou
it is possible to create a DOMAIN on WingFTPServer by a lua script?
is there a function or a way for doing that?
Thanks You

Re: Create a DOMAIN on server by LUA script

Posted: Fri Oct 18, 2013 9:25 am
by kirikou
I discover now how to do it: for example, you want to create a domain called "flaubert", you have to use this function:

c_AddDomain('flaubert','*',-1,-1,-1,-1,-1)

You can send this command to wingftpserver by a curl command, we suppose that you defined(On wingftpserver) for user admin: "kirikou" and for password admin: "armand", and ip adress where wingftpserver installed is 192.168.103.112

curl.exe -F "admin=kirikou" -F "pass=armand" -F "cmd=c_AddDomain('flaubert','*',-1,-1,-1,-1,-1)" "http://192.168.103.112:5466/admin_webservice.html?" -o curl.log

Thanks you