diff options
author | Marian Sigler <m@qjym.de> | 2012-09-28 01:41:09 +0200 |
---|---|---|
committer | Marian Sigler <m@qjym.de> | 2012-09-28 01:41:09 +0200 |
commit | bbdc690a1f69c9e7f286a5fbd0cb64403d51c721 (patch) | |
tree | 9b8a9f4bcc2989b1b7b134fd0b93311d05a1f3f1 /contrib/munin | |
parent | 84546333cae64f9ea0765e3cc36f1f92674a1a08 (diff) | |
download | web-bbdc690a1f69c9e7f286a5fbd0cb64403d51c721.tar.gz web-bbdc690a1f69c9e7f286a5fbd0cb64403d51c721.tar.bz2 web-bbdc690a1f69c9e7f286a5fbd0cb64403d51c721.zip |
move ldap settings from account.py to config
Diffstat (limited to 'contrib/munin')
-rwxr-xr-x[-rw-r--r--] | contrib/munin/accounts.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/munin/accounts.py b/contrib/munin/accounts.py index 947989b..684f278 100644..100755 --- a/contrib/munin/accounts.py +++ b/contrib/munin/accounts.py @@ -1,17 +1,23 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(dirname(abspath(__file__))))) -from account import * +from account import AccountService +from app import app if __name__ == "__main__": if len(sys.argv) > 1 and sys.argv[1] == 'config': - print('graph_title Splinux') - print('graph_vlabel Amount') + print('graph_title Spline Accounts') + print('graph_vlabel Number') print('accounts.label Accounts') else: - service = AccountService(LDAP_HOST, LDAP_BASE_DN, SERVICES, LDAP_ADMIN_USER, LDAP_ADMIN_PASS) + service = AccountService(app.config['LDAP_HOST'], app.config['LDAP_BASE_DN'], + app.config['LDAP_ADMIN_USER'], app.config['LDAP_ADMIN_PASS'], + app.all_services) + accounts = service.find() - print('accounts.value %s' % len(accounts)) + print('accounts.value %d' % len(accounts)) |