~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to services/usrmgt-server

Moved groups over to the new class-based xhtml templating way of being
displayed

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import sys
5
5
import logging
6
6
 
7
 
import ivle.config
8
7
import ivle.conf
9
8
import ivle.database
10
9
import ivle.chat
125
124
    }
126
125
 
127
126
def initializer():
128
 
    logging.basicConfig(filename="/var/log/usrmgt.log", level=logging.INFO)
129
 
    logging.info("Starting usrmgt server on port %d (pid = %d)" %
130
 
                 (ivle.conf.usrmgt_port, pid))
131
 
 
132
127
    try:
133
128
        pidfile = open('/var/run/usrmgt-server.pid', 'w')
134
129
        pidfile.write('%d\n' % os.getpid())
140
135
def dispatch(props):
141
136
    logging.debug(repr(props))
142
137
 
143
 
    store = ivle.database.get_store(ivle.config.Config())
 
138
    store = ivle.database.get_store()
144
139
    action = props.keys()[0]
145
140
    res = actions[action](store, props[action])
146
141
 
154
149
if __name__ == "__main__":
155
150
    pid = os.getpid()
156
151
 
 
152
    logging.basicConfig(filename="/var/log/usrmgt.log", level=logging.INFO)
 
153
    logging.info("Starting usrmgt server on port %d (pid = %d)" %
 
154
                 (ivle.conf.usrmgt_port, pid))
 
155
 
157
156
    ivle.chat.start_server(ivle.conf.usrmgt_port, ivle.conf.usrmgt_magic,
158
157
                           True, dispatch, initializer)