@@ -0,0 +1,853 @@
+import sys%0Afrom brain.models.sqlobjects import User%0Afrom brain.helpers.sql import session_transaction%0A%0A%0Aif len(sys.argv) not in (4, 5):%0A    print(%22usage: %7B0%7D %3Cusername%3E %3Crmqvhost%3E %3Cftpuser%3E %5Bquota%5D%5Cn%22%0A          %22      with %3Cusername%3E a string%5Cn%22%0A          %22           %3Crmqvhost%3E the rmqvhost used for the frontend%5Cn%22%0A          %22           %3Cftpuser%3E the ftpuser used by the frontend%5Cn%22%0A          %22           %5Bquota%5D the number of file scan quota%5Cn%22%0A          %22example: %7B0%7D test1 mqfrontend frontend%22%0A          %22%22.format(sys.argv%5B0%5D))%0A    sys.exit(1)%0A%0A# quota is in number of files (0 means disabled)%0Aquota = int(sys.argv%5B4%5D) if len(sys.argv) == 5 else 0%0Awith session_transaction() as session:%0A    user = User(name=sys.argv%5B1%5D,%0A                rmqvhost=sys.argv%5B2%5D,%0A                ftpuser=sys.argv%5B3%5D,%0A                quota=quota)%0A    user.save(session)%0A

Add sql user creation script