Skip to content

lw016/servd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Servd

Python daemonizer for Unix, Linux and OS X.

This library is a fork of python-daemon developed originally by serverdensity.

Install

Tested on Python 3.0+, there is no dependencies.

pip install servd

Usage

It has a very simple usage and only requires a pid file to keep track of the daemon. The run() method should be overrided.

from servd import Daemon


class Service(Daemon):
    def __init__(self, pidfile) -> None:
        super().__init__(pidfile)

    def run(self) -> None:
        """Service code."""


service = Service("service.pid")

# Start service daemon
service.start()

# Restart service daemon
service.restart()

# Stop service daemon
service.stop()

About

Python daemonizer for Unix, Linux and OS X.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages