diff --git a/check_systemd_service.sh b/check_systemd_service.sh index 8147906..9cb4434 100755 --- a/check_systemd_service.sh +++ b/check_systemd_service.sh @@ -71,7 +71,7 @@ current_time=$(date +%s) start_time_diff="undefined" end_time_diff="undefined" -if [ -n "$start_time" ]; then +if [ -n "$start_time" ] && [ "$start_time" != "n/a" ]; then start_time_diff=$((current_time - $(date -d "$start_time" +%s))) start_time_diff_perf="| uptime=${start_time_diff}s" fi