13 lines
198 B
Python
Executable File
13 lines
198 B
Python
Executable File
from time import sleep
|
|
from daemonize import Daemonize
|
|
|
|
pid = "/tmp/test.pid"
|
|
|
|
|
|
def main():
|
|
while True:
|
|
sleep(5)
|
|
|
|
daemon = Daemonize(app="test_app", pid=pid, action=main)
|
|
daemon.start()
|