From d1566c5bc8df93f1fd43a38e8bcf5d340e8a4a14 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 29 Mar 2015 10:08:00 +0000 Subject: [PATCH] * try to support DSM log button --- installer/spk/scripts/start-stop-status | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installer/spk/scripts/start-stop-status b/installer/spk/scripts/start-stop-status index 163877b3..93b9975b 100644 --- a/installer/spk/scripts/start-stop-status +++ b/installer/spk/scripts/start-stop-status @@ -29,7 +29,8 @@ case "$1" in ;; log) - find "$APP_ROOT/data" -name "*.log" -type f -print0 | xargs -0 ls -Alt1 | head -n 5 | awk '{print $7}' + // select most recently modified log file (Caveats: the path of the log file must not contain spaces) + find "$APP_ROOT/data" -name "*.log" -type f -print0 | xargs -0 ls -Alt1 | head -n 1 | awk '{print $7}' exit 0 ;;