Browse Source

Fix sec. since wakeup script: Didn't work when day of month < 10

master
Burathar 4 years ago
parent
commit
5ee24f53b7
  1. 2
      bin/seconds_since_wakeup.sh

2
bin/seconds_since_wakeup.sh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#! /bin/bash
last_wakeup_str=`grep "Enabling non-boot CPUs ..." /var/log/kern.log | tail -n 1 | cut -d ' ' -f 1-3`
last_wakeup_str=`grep "Enabling non-boot CPUs ..." /var/log/kern.log | tail -n 1 | egrep -o '^.*..:..:..' | head -1`
[ -z "$last_wakeup_str" ] && echo -1 && exit 1
wakeup_unix="$(date --date="$last_wakeup_str" +%s)"

Loading…
Cancel
Save