Usage:

The most common usage is to import the initd module into an executable script
and then to utilize the execute function within the initd module.  This
requires that your daemon is structured in such a way as to have a single
function that should be called over and over in a loop.  You will use this as
the run parameter to the execute function.  Then, also specify a location to
save the pid and optionally a log file.

Here is an example.

def run():
    # perform important work here

if __name__ == '__main__':
    import initd
    initd.execute(run, '/path/to/pid-file', '/path/to/log-file')
