Create a DOMAIN on server by LUA script

You can share your Lua Scripts with everybody here.
Post Reply
kirikou
Posts: 9
Joined: Wed Aug 07, 2013 9:20 am

Create a DOMAIN on server by LUA script

Post 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
kirikou
Posts: 9
Joined: Wed Aug 07, 2013 9:20 am

Re: Create a DOMAIN on server by LUA script

Post 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
Post Reply