From 02a5c7f2a0dfa98dead893131f94eef8332cd36d Mon Sep 17 00:00:00 2001 From: Bernd Machenschalk Date: Tue, 3 Jun 2014 05:51:43 +0000 Subject: [PATCH] server: start: start daemons silently when configured with --- sched/start | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sched/start b/sched/start index 3efd7fa423..f9eb6bcb67 100755 --- a/sched/start +++ b/sched/start @@ -161,6 +161,9 @@ def get_daemon_output_name(task): return os.path.join(log_dir, task.__dict__.get('output') or get_task_command_basename(task) + '.log') +def get_daemon_silent_start(task): + return task.__dict__.get('silent_start') or 0 + def get_daemon_pid_name(task): return os.path.join(pid_dir, task.__dict__.get('pid_file') or get_task_command_basename(task) + '.pid') @@ -404,7 +407,7 @@ def run_daemon(task): if verbose: print >>sys.stderr, " Daemon already running:",task.cmd sys.exit(0) - if verbose or verbose_daemon_run: + if verbose or ( verbose_daemon_run and not get_daemon_silent_start(task) ): print " Starting daemon:", task.cmd sys.stdout.flush() redirect(get_daemon_output_name(task))