summarylogtreecommitdiffstats
path: root/setwakeup.sh
blob: 4a66b43890162e8c6e2d298f340f677598dd20af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

#Sync back system time to hardware time (Maybe VDR has changed it)
hwclock --systohc --utc

#Unset previous timer
echo '0' > /sys/class/rtc/rtc0/wakealarm

#Set new timer
echo "$1" > /sys/class/rtc/rtc0/wakealarm

#Log success to journal
echo "Set wakeup time to timestamp $1" | logger -t kodi-setwakeup