File: //usr/share/doc/lwdbadmin-4.5/README.md
# Build information #
## Debian ##
$ dpkg-buildpackage -us -uc -sa
## CentOS 5 (locaweb python 2.6) ##
\# Fix the python requires first
$ python setup.py sdist
$ rpmbuild --define "rhel 5" --define "__python /usr/bin/python2.6" --define "dist .centos5" -ta dist/lwdbadmin-*.tar.gz
## CentOS 7 ##
* $ python setup.py sdist
* $ rpmbuild -ta dist/lwdbadmin-*.tar.gz
# Usage information #
Description of each command of this package
## lwdbprovd ##
Example DB: ze
PATCH will change the password and stop, and then test database status
### MySQL actions ###
* curl -H "Content-Type: application/json" -X POST -d '{"database":"ze","username":"ze","password":"senha"}' http://apiuser:apipassword@localhost:8080/mysql
* curl http://apiuser:apipassword@localhost:8080/mysql/ze
* curl -H "Content-Type: application/json" -X PATCH -d '{"status":"disabled"}' http://apiuser:apipassword@localhost:8080/mysql/ze
* curl -H "Content-Type: application/json" -X PATCH -d '{"status":"enabled"}' http://apiuser:apipassword@localhost:8080/mysql/ze
* curl -H "Content-Type: application/json" -X PATCH -d '{"password":"senha"}' http://apiuser:apipassword@localhost:8080/mysql/ze
* curl -X DELETE http://apiuser:apipassword@0.0.0.0:8080/mysql/ze
### PostgreSQL actions ###
* curl -H "Content-Type: application/json" -X POST -d '{"database":"ze","username":"ze","password":"senha"}' http://apiuser:apipassword@localhost:8080/pgsql
* curl -H "Content-Type: application/json" -X POST -d '{"database":"ze","username":"ze","password":"senha","encoding":"UTF-8","collate":"en_US.UTF-8","ctype":"en_US.UTF-8"}' http://apiuser:apipassword@localhost:8080/pgsql
* curl http://apiuser:apipassword@localhost:8080/pgsql/ze
* curl -H "Content-Type: application/json" -X PATCH -d '{"status":"disabled"}' http://apiuser:apipassword@localhost:8080/pgsql/ze
* curl -H "Content-Type: application/json" -X PATCH -d '{"status":"enabled"}' http://apiuser:apipassword@localhost:8080/pgsql/ze
* curl -H "Content-Type: application/json" -X PATCH -d '{"password":"senha"}' http://apiuser:apipassword@localhost:8080/pgsql/ze
* curl -X DELETE http://apiuser:apipassword@0.0.0.0:8080/pgsql/ze
## lwpgctrl e lwmyctrl ##
Manage shared hosting databases. Possible actions:
* criarbase
* removerbase
* ativarbase
* desativarbase
* trocasenha
* statusbase
## lwpgsrvadm ##
Create new services from scratch.