From ec5c970499f8f0b8d78548a5c080b771c4e027d3 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 20 Sep 2007 19:56:05 +0000 Subject: [PATCH] Add 'deluged' script to start the deluge daemon. --- deluge/main.py | 8 ++++++++ setup.py | 1 + 2 files changed, 9 insertions(+) diff --git a/deluge/main.py b/deluge/main.py index e1db010d5..6a5ee878b 100644 --- a/deluge/main.py +++ b/deluge/main.py @@ -80,3 +80,11 @@ def main(): if options.ui: log.info("Starting ui..") UI() + +def start_daemon(): + """Entry point for daemon script""" + log.info("Deluge daemon %s", deluge.common.get_version()) + log.info("Starting daemon..") + pid = os.fork() + if not pid: + Daemon() diff --git a/setup.py b/setup.py index 1083eb582..1f098d887 100644 --- a/setup.py +++ b/setup.py @@ -195,4 +195,5 @@ setup( entry_points = """ [console_scripts] deluge = deluge.main:main + deluged = deluge.main:start_daemon """)