diff --git a/check_systemd_service.sh b/check_systemd_service.sh index 9cb4434..ab69f90 100755 --- a/check_systemd_service.sh +++ b/check_systemd_service.sh @@ -68,8 +68,8 @@ fi start_time=$(systemctl show "$UNIT_NAME" --property=ExecMainStartTimestamp --value) end_time=$(systemctl show "$UNIT_NAME" --property=ExecMainExitTimestamp --value) current_time=$(date +%s) -start_time_diff="undefined" -end_time_diff="undefined" +start_time_diff_perf="" +end_time_diff_perf="" if [ -n "$start_time" ] && [ "$start_time" != "n/a" ]; then start_time_diff=$((current_time - $(date -d "$start_time" +%s)))