Create a DOMAIN on server by LUA script

You can share your Lua Scripts with everybody here.

Create a DOMAIN on server by LUA script

Postby kirikou » Thu Oct 17, 2013 2:13 pm

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

Postby kirikou » Fri Oct 18, 2013 9:25 am

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
kirikou
 
posts 9
 
joined Wed Aug 07, 2013 9:20 am


Return to Lua scripts

Who is online

Users browsing this forum: No registered users and 0 guests

cron