Metadata-Version: 1.0
Name: SimpleDaemon
Version: 1.3.0
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
        
        
        Installation
        ============
        ::
            pip install simpledaemon
        
        
        Example
        =======
        Writing a daemon requires creating two files, a daemon
        file which simply enters an infinite loop and does whatever
        you want it to do, and a configuration file with the same name
        which tells `simpledaemon` how to setup your daemon.
        
        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]
            pidfile = ./hellodaemon.pid
            logfile = ./hellodaemon.log
            loglevel = info
        
        
        Usage
        =====
        To use your new daemon, execute your script like so::
        
            ./hello.py --start
        
        Stopping is similar::
        
            ./hello.py --stop
        
        For a full list of options, see the help::
        
            ./hello.py --help
        
        
        Bugs
        ====
        If you come across any bugs in simpledaemon.  Kindly file an issue at: https://bitbucket.org/donspaulding/simpledaemon/issues/new
        
        Pull requests are also welcome.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
