mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 13:12:17 +03:00
ahenk deb config
This commit is contained in:
parent
35bb13b833
commit
165634db60
15 changed files with 110 additions and 15 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,4 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
|
*.py[cod]
|
||||||
|
debian/ahenk/*
|
||||||
|
debian/ahenk
|
||||||
|
|
3
debian/ahenk.install
vendored
Normal file
3
debian/ahenk.install
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
opt/ /
|
||||||
|
etc/ /
|
||||||
|
lib/ /
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
ahenk (1.0) unstable; urgency=low
|
||||||
|
|
||||||
|
* Ahenk core app
|
||||||
|
|
||||||
|
-- ismail.basaran <ismail.basaran@tubitak.gov.tr> Thu, 10 Dec 2015 22:21:04 +0200
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
9
|
13
debian/control
vendored
Normal file
13
debian/control
vendored
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
Source: ahenk
|
||||||
|
Section: unknown
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: TUBITAK ULAKBIM
|
||||||
|
Build-Depends: debhelper (>= 9)
|
||||||
|
Standards-Version: 3.9.5
|
||||||
|
Homepage: http://www.liderahenk.org.tr
|
||||||
|
|
||||||
|
Package: ahenk
|
||||||
|
Architecture: any
|
||||||
|
Depends:python-deamon, python2.7 (>= 2.7.3)
|
||||||
|
Description: LiderAhenk agent application
|
||||||
|
Long Desc
|
1
debian/files
vendored
Normal file
1
debian/files
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ahenk_1.0_amd64.deb unknown optional
|
28
debian/rules
vendored
Executable file
28
debian/rules
vendored
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# See debhelper(7) (uncomment to enable)
|
||||||
|
# output every command that modifies files on the build system.
|
||||||
|
#DH_VERBOSE = 1
|
||||||
|
|
||||||
|
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
|
||||||
|
DPKG_EXPORT_BUILDFLAGS = 1
|
||||||
|
include /usr/share/dpkg/default.mk
|
||||||
|
|
||||||
|
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||||
|
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
|
|
||||||
|
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||||
|
# package maintainers to append CFLAGS
|
||||||
|
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||||
|
# package maintainers to append LDFLAGS
|
||||||
|
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||||
|
|
||||||
|
|
||||||
|
# main packaging script based on dh7 syntax
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
# debmake generated override targets
|
||||||
|
# This is example for Cmake (See http://bugs.debian.org/641051 )
|
||||||
|
#override_dh_auto_configure:
|
||||||
|
# dh_auto_configure -- \
|
||||||
|
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
|
|
@ -1,11 +1,12 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
||||||
|
|
||||||
from base.config.ConfigManager import ConfigManager
|
from base.config.ConfigManager import ConfigManager
|
||||||
from base.deamon.BaseDeamon import BaseDeamon
|
from base.deamon.BaseDeamon import BaseDeamon
|
||||||
from base.logging.AhenkLogger import Logger
|
from base.logger.AhenkLogger import AhenkLogger
|
||||||
from base.Scope import Scope
|
from base.Scope import Scope
|
||||||
|
#from base.messaging.Messaging import Messaging
|
||||||
import sys,logging
|
import sys,logging
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,18 +33,18 @@ class AhenkDeamon(BaseDeamon):
|
||||||
config = configManager.read()
|
config = configManager.read()
|
||||||
globalscope.setConfigurationManager(config)
|
globalscope.setConfigurationManager(config)
|
||||||
|
|
||||||
logger = Logger()
|
#logger = AhenkLogger()
|
||||||
logger.info("obaraaa")
|
#logger.info("obaraaa")
|
||||||
globalscope.setLogger(logger)
|
#globalscope.setLogger(logger)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#messaging=Messaging()
|
||||||
|
#messaging.connectToServer()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
print "hello"
|
||||||
|
print sys.path
|
||||||
|
"""
|
||||||
pidfilePath='/var/run/ahenk.pid'
|
pidfilePath='/var/run/ahenk.pid'
|
||||||
|
|
||||||
deamon = AhenkDeamon(pidfilePath)
|
deamon = AhenkDeamon(pidfilePath)
|
||||||
|
@ -65,3 +66,4 @@ if __name__ == '__main__':
|
||||||
else:
|
else:
|
||||||
print 'Usage : %s start|stop|restart|status' % sys.argv[0]
|
print 'Usage : %s start|stop|restart|status' % sys.argv[0]
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
"""
|
||||||
|
|
Binary file not shown.
Binary file not shown.
38
opt/ahenk/base/logger/AhenkLogger.py
Normal file
38
opt/ahenk/base/logger/AhenkLogger.py
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
||||||
|
import sys
|
||||||
|
import logging
|
||||||
|
import logging.config
|
||||||
|
sys.path.insert(0,'/home/ismail/devzone/workspace/lider-ahenk/ahenk/opt/ahenk/')
|
||||||
|
#import ahenkd
|
||||||
|
|
||||||
|
class AhenkLogger(object):
|
||||||
|
"""docstring for Logger"""
|
||||||
|
def __init__(self):
|
||||||
|
super(Logger, self).__init__()
|
||||||
|
scope = ahenkd.AhenkDeamon.scope()
|
||||||
|
configManager = scope.getConfigurationManager()
|
||||||
|
|
||||||
|
logging.config.fileConfig(configManager.get('BASE','logConfigurationFilePath'))
|
||||||
|
self.logger = logging.getLogger()
|
||||||
|
|
||||||
|
def getLogger(self):
|
||||||
|
return self.logger
|
||||||
|
|
||||||
|
def info(self,logstring):
|
||||||
|
self.logger.info(logstring)
|
||||||
|
|
||||||
|
def warning(self,logstring):
|
||||||
|
self.logger.warning(logstring)
|
||||||
|
|
||||||
|
def error(self,logstring):
|
||||||
|
self.logger.error(logstring)
|
||||||
|
|
||||||
|
def debug(self,logstring):
|
||||||
|
self.logger.debug(logstring)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
print "hello"
|
||||||
|
print sys.path
|
0
opt/ahenk/base/logger/__init__.py
Normal file
0
opt/ahenk/base/logger/__init__.py
Normal file
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
||||||
|
import sys
|
||||||
|
sys.path.append('../..')
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
from ahenkd import AhenkDeamon
|
from ahenkd import AhenkDeamon
|
||||||
|
|
||||||
class Logger(object):
|
class AhenkLogger(object):
|
||||||
"""docstring for Logger"""
|
"""docstring for Logger"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Logger, self).__init__()
|
super(Logger, self).__init__()
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Author: Volkan Şahin <basaran.ismaill@gmail.com>
|
# Author: Volkan Şahin <basaran.ismaill@gmail.com>
|
||||||
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
||||||
|
import sys
|
||||||
import configparser
|
sys.path.append('../..')
|
||||||
import slixmpp
|
import slixmpp
|
||||||
from slixmpp.exceptions import IqError, IqTimeout
|
from slixmpp.exceptions import IqError, IqTimeout
|
||||||
from ahenkd import AhenkDeamon
|
from ahenkd import AhenkDeamon
|
||||||
|
|
Loading…
Reference in a new issue