#!/usr/pkg/bin/python2.7

from  pytemplate import PyTemplate
import time

__version__ = "0.1.0"

class MyProgram(PyTemplate):
    def __init__(self):
	self.version = __version__
	PyTemplate.__init__(self)
	self.add_signal("SIGQUIT")

    def handle_signal_SIGQUIT(self,sig,egg):
	self.lprint("My daemon template received a SIGQUIT",False,True)
	sys.exit()

    def loadparams(self, args):
	return

    def main(self):
	while 1:
    	    self.lprint("My daemon template is running \
			at "+str(time.asctime()),False,True)
    	    sleeptime=5
	    time.sleep(sleeptime)

if __name__ == '__main__':
    prog = MyProgram()
    prog.run()



