diff --git a/etc/ahenk/ahenk.conf b/etc/ahenk/ahenk.conf index 6e76538..feb8779 100644 --- a/etc/ahenk/ahenk.conf +++ b/etc/ahenk/ahenk.conf @@ -1,6 +1,6 @@ [BASE] logconfigurationfilepath = /etc/ahenk/log.conf -dbPath=/etc/ahenk/ahenk.db +dbpath = /etc/ahenk/ahenk.db [PLUGIN] pluginfolderpath = /opt/ahenk/plugins/ @@ -8,7 +8,7 @@ mainmodulename = main [CONNECTION] uid = -password= +password = host = port = 5222 receiverjid = lider_sunucu @@ -20,3 +20,6 @@ receivefileparam = /tmp/ agreement_timeout = 30 registration_timeout = 30 get_policy_timeout = 30 + +[MACHINE] +type = default \ No newline at end of file diff --git a/opt/ahenk/base/system/system.py b/opt/ahenk/base/system/system.py index f2b7436..02fecd8 100644 --- a/opt/ahenk/base/system/system.py +++ b/opt/ahenk/base/system/system.py @@ -468,6 +468,14 @@ class System: return arr + @staticmethod + def machine_type(): + config = configparser.ConfigParser() + config._interpolation = configparser.ExtendedInterpolation() + config.read(System.Ahenk.config_path()) + return config.get('MACHINE', 'type') + + @staticmethod def interfaces_details(): return psutil.net_if_addrs() @@ -531,3 +539,4 @@ class System: @staticmethod def model(): return cpuinfo.get_cpu_info()['model'] +