Beispiel #1
0
	def SvcDoRun(self):
		'''Service Run entry point'''
		# initialize your services here
		sysLogInfo("Starting {0} {1}".format(IService(application).name, __version__))
		IService(application).startService()
		reactor.run(installSignalHandlers=0)
		sysLogInfo("{0} {1} Windows service stopped".format( IService(application).name, __version__ ))
 def SvcContinue(self):
     '''Service Continue entry point'''
     self.ReportServiceStatus(win32service.SERVICE_CONTINUE_PENDING)
     reactor.callFromThread(TopLevelService.sigresume)
     sysLogInfo("Resuming {0} {1} Windows service".format(
         IService(application).name, __version__))
     self.ReportServiceStatus(win32service.SERVICE_RUNNING)
 def SvcPause(self):
     '''Service Pause entry point'''
     self.ReportServiceStatus(win32service.SERVICE_PAUSE_PENDING)
     reactor.callFromThread(TopLevelService.sigpause)
     sysLogInfo("Pausing {0} {1} Windows service".format(
         IService(application).name, __version__))
     self.ReportServiceStatus(win32service.SERVICE_PAUSED)
 def SvcDoRun(self):
     '''Service Run entry point'''
     # initialize your services here
     sysLogInfo("Starting {0} {1}".format(
         IService(application).name, __version__))
     IService(application).startService()
     reactor.run(installSignalHandlers=0)
     sysLogInfo("{0} {1} Windows service stopped".format(
         IService(application).name, __version__))
Beispiel #5
0
from twisted.internet import reactor
from twisted.application.service import IService

#--------------
# local imports
# -------------

from tessdb  import __version__
from tessdb.application import application
from tessdb.logger      import sysLogInfo

# ----------------
# Module constants
# ----------------

# -----------------------
# Module global variables
# -----------------------


# ------------------------
# Module Utility Functions
# ------------------------

# MAIN CODE

sysLogInfo("Starting {0} {1} Linux service".format(IService(application).name, __version__ ))
IService(application).startService()
reactor.run()
sysLogInfo("{0} {1} Linux service stopped".format(IService(application).name, __version__ ))
sys.exit(0)
Beispiel #6
0
	def SvcContinue(self):
		'''Service Continue entry point'''
		self.ReportServiceStatus(win32service.SERVICE_CONTINUE_PENDING)
		reactor.callFromThread(TopLevelService.sigresume)
		sysLogInfo("Resuming {0} {1} Windows service".format( IService(application).name, __version__ ))
		self.ReportServiceStatus(win32service.SERVICE_RUNNING)
Beispiel #7
0
	def SvcPause(self):
		'''Service Pause entry point'''
		self.ReportServiceStatus(win32service.SERVICE_PAUSE_PENDING)
		reactor.callFromThread(TopLevelService.sigpause)
		sysLogInfo("Pausing {0} {1} Windows service".format( IService(application).name, __version__ ))
		self.ReportServiceStatus(win32service.SERVICE_PAUSED)
Beispiel #8
0
	def SvcStop(self):
		'''Service Stop entry point'''
		self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
		reactor.callFromThread(reactor.stop)
		sysLogInfo("Stopping {0} {1} Windows service".format( IService(application).name, __version__ ))
Beispiel #9
0
	def SvcDoReload(self):
		sysLogInfo("Reloading {0} {1} Windows service".format( IService(application).name, __version__ ))
		reactor.callFromThread(TopLevelService.sigreload)
Beispiel #10
0
# ---------------

from twisted.internet import reactor
from twisted.application.service import IService

#--------------
# local imports
# -------------

from tessdb  import __version__
from tessdb.application import application
from tessdb.logger      import sysLogInfo

# ----------------
# Module constants
# ----------------

# -----------------------
# Module global variables
# -----------------------


# ------------------------
# Module Utility Functions
# ------------------------

sysLogInfo("Starting {0} {1} Linux service".format(IService(application).name, __version__ ))
IService(application).startService()
reactor.run()
sysLogInfo("{0} {1} Linux service stopped".format(IService(application).name, __version__ ))
Beispiel #11
0
 def SvcStop(self):
     '''Service Stop entry point'''
     self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
     reactor.callFromThread(reactor.stop)
     sysLogInfo("Stopping {0} {1} Windows service".format(
         IService(application).name, __version__))
Beispiel #12
0
 def SvcDoReload(self):
     sysLogInfo("Reloading {0} {1} Windows service".format(
         IService(application).name, __version__))
     reactor.callFromThread(TopLevelService.sigreload)