Metadata-Version: 1.0
Name: SimpleDaemon
Version: 1.0.1
Summary: Provides a simple Daemon class to ease the process of forking a python application on Unix systems.
Home-page: http://bitbucket.org/donspaulding/simpledaemon/
Author: Don Spaulding
Author-email: donspauldingii@gmail.com
License: The MIT License

Copyright (c) 2010 Shane Hathaway

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Description: ============
        SimpleDaemon
        ============
        
        A fork of `Shane Hathaway's daemon.py <http://hathawaymix.org/Software/Sketches/daemon.py>`_ script.
        
        Features
        ========
        
        * reads the command line
        * reads a configuration file
        * configures logging
        * calls root-level setup code
        * drops privileges
        * calls user-level setup code
        * detaches from the controlling terminal
        * checks and writes a pidfile
        
        
        Example
        =======
        Writing a daemon requires creating two files, a daemon
        file and a configuration file with the same name.
        
        hellodaemon.py::
        
        import simpledaemon
        import logging
        import time
        
        class HelloDaemon(simpledaemon.Daemon):
        default_conf = '/etc/hellodaemon.conf'
        section = 'hello'
        
        def run(self):
        while True:
        logging.info('The daemon says hello')
        time.sleep(1)
        
        if __name__ == '__main__':
        HelloDaemon().main()
        
        hellodaemon.conf::
        
        [hello]
        uid =
        gid =
        pidfile = ./hellodaemon.pid
        logfile = ./hellodaemon.log
        loglevel = info
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
