Funktion zum erfassen der Weckzeit gefixt
This commit is contained in:
parent
8a9dea2d71
commit
c872f1d93d
@ -29,9 +29,9 @@ delete_expired_at_jobs
|
||||
|
||||
# Die IP-Adresse von Lisas-IPhone holen.
|
||||
check_ip() {
|
||||
mac_address="e4:cd:d1" # Ersetze dies # Die IP-Adresse von Lisas-IPhone holen.
|
||||
A72_ip=$(arp -a | grep "$mac_address" | awk '{print $2}' | sed 's/[()]//g')
|
||||
echo "$A72_ip"
|
||||
mac_address="e4:cd:d1" # Ersetze dies durch die MAC-Adresse
|
||||
A72_ip=$(arp-scan --localnet | grep "$mac_address" | awk '{print $1}')
|
||||
echo "Gefundene IP: $A72_ip"
|
||||
}
|
||||
|
||||
# check_ip -Funktion ausführen.
|
||||
@ -61,7 +61,7 @@ fi
|
||||
# Überprüfen, ob das Ziel erreichbar ist
|
||||
if is_target_reachable; then
|
||||
# Ziel ist erreichbar, Alarmzeit über SSH abrufen
|
||||
alarmTime=$(ssh -i /root/.ssh/A72 root@$A72_ip dumpsys alarm | grep triggerTime | cut -d= -f2 | cut -c1-16 | uniq)
|
||||
alarmTime=$(ssh -i /root/.ssh/A72 root@$A72_ip dumpsys alarm | grep -A 6 ":com.urbandroid.sleep.alarmclock.ALARM_ALERT" | grep "type=RTC_WAKEUP origWhen=" | cut -d= -f3 | cut -c1-16 | uniq)
|
||||
|
||||
if [ -n "$alarmTime" ]; then
|
||||
# Zerlege das Datum und die Uhrzeit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user