Daemonize and pid_file support

This commit is contained in:
Ruud
2012-01-15 02:03:30 +01:00
parent 01f3a68812
commit 3ad0f91dc4
3 changed files with 135 additions and 171 deletions
+4
View File
@@ -27,6 +27,10 @@ def getOptions(base_path, args):
dest = 'quiet', help = 'No console logging')
parser.add_argument('--nogit', action = 'store_true',
dest = 'nogit', help = 'No git available')
parser.add_argument('--daemon', action = 'store_true',
dest = 'daemon', help = 'Daemonize the app')
parser.add_argument('--pid_file', default = os.path.join(data_dir, 'couchpotato.pid'),
dest = 'pid_file', help = 'Path to pidfile needed for daemon')
options = parser.parse_args(args)