From 907db9a5383136f945560b1c0c41cf50dde07f13 Mon Sep 17 00:00:00 2001 From: Taeyeon Mori Date: Mon, 19 Mar 2018 18:29:27 +0100 Subject: [PATCH] Avoid printing to stdout in daemon mode --- create_ap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/create_ap b/create_ap index 5ecea86..0cda41d 100755 --- a/create_ap +++ b/create_ap @@ -1314,7 +1314,11 @@ if [[ $FIX_UNMANAGED -eq 1 ]]; then fi if [[ $DAEMONIZE -eq 1 && $RUNNING_AS_DAEMON -eq 0 ]]; then - echo "Running as Daemon..." + # Assume we're running underneath a service manager if PIDFILE is set + # and don't clobber it's output with a useless message + if [ -z "$DAEMON_PIDFILE" ]; then + echo "Running as Daemon..." + fi # run a detached create_ap RUNNING_AS_DAEMON=1 setsid "$0" "${ARGS[@]}" >>$DAEMON_LOGFILE 2>&1 & exit 0