mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 10:52:17 +03:00
bugfix
This commit is contained in:
parent
f52290b218
commit
4bec8505cd
1 changed files with 5 additions and 3 deletions
|
@ -299,19 +299,21 @@ class AhenkDaemon(BaseDaemon):
|
||||||
|
|
||||||
if conf_manager.has_section('MACHINE'):
|
if conf_manager.has_section('MACHINE'):
|
||||||
user_disabled = conf_manager.get("MACHINE", "user_disabled")
|
user_disabled = conf_manager.get("MACHINE", "user_disabled")
|
||||||
if user_disabled==0:
|
self.logger.info('User disabled value='+ str(user_disabled))
|
||||||
|
if user_disabled == '0':
|
||||||
self.logger.info('local user disabling')
|
self.logger.info('local user disabling')
|
||||||
global_scope.get_registration().disable_local_users()
|
global_scope.get_registration().disable_local_users()
|
||||||
|
|
||||||
conf_manager.set('MACHINE', 'user_disabled', 1)
|
conf_manager.set('MACHINE', 'user_disabled', '1')
|
||||||
|
|
||||||
with open('/etc/ahenk/ahenk.conf', 'w') as configfile:
|
with open('/etc/ahenk/ahenk.conf', 'w') as configfile:
|
||||||
self.conf_manager.write(configfile)
|
self.conf_manager.write(configfile)
|
||||||
self.logger.info('local user disabled')
|
self.logger.info('local user disabled')
|
||||||
|
user_disabled = conf_manager.get("MACHINE", "user_disabled")
|
||||||
|
self.logger.info('User disabled value=' + str(user_disabled))
|
||||||
else :
|
else :
|
||||||
self.logger.info('users already disabled')
|
self.logger.info('users already disabled')
|
||||||
|
|
||||||
|
|
||||||
#self.logger.info('Ahenk was registered')
|
#self.logger.info('Ahenk was registered')
|
||||||
|
|
||||||
self.messenger = self.init_messenger()
|
self.messenger = self.init_messenger()
|
||||||
|
|
Loading…
Reference in a new issue