Aktualisiere Wecker-Script:
- Geänderte Mac-Adresse für die Funktion check_ip. - Verwende 'arp-scan' für die IP-Ermittlung. - Verbesserte Ausgabe und Wartezeit in der Funktion check_notification. - Start des Alarm-Scripts auf dem Handy mit protokollierter Ausgabe.
This commit is contained in:
parent
43564c52ac
commit
5bb790bb3b
12
wecker.sh
12
wecker.sh
@ -41,9 +41,9 @@ set_color() {
|
|||||||
|
|
||||||
# Die IP-Adresse von Lisas-IPhone holen.
|
# Die IP-Adresse von Lisas-IPhone holen.
|
||||||
check_ip() {
|
check_ip() {
|
||||||
mac_address="18:ab:1d" # Ersetze dies # Die IP-Adresse von Lisas-IPhone holen.
|
mac_address="e4:cd:d1" # Ersetze dies durch die MAC-Adresse
|
||||||
A72_ip=$(arp -a | grep "$mac_address" | awk '{print $2}' | sed 's/[()]//g')
|
A72_ip=$(arp-scan --localnet | grep "$mac_address" | awk '{print $1}')
|
||||||
echo "IP von Handy: $A72_ip"
|
echo "Gefundene IP: $A72_ip"
|
||||||
}
|
}
|
||||||
|
|
||||||
# check_ip -Funktion ausführen.
|
# check_ip -Funktion ausführen.
|
||||||
@ -142,8 +142,12 @@ colortemp_step=$(bc <<< "$start_colortemp / $steps")
|
|||||||
sleep 27 # Änderungen alle 30 (27) Sekunden
|
sleep 27 # Änderungen alle 30 (27) Sekunden
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# check_ip -Funktion ausführen.
|
||||||
|
check_ip
|
||||||
|
echo "$A72_ip"
|
||||||
# Starten des Alarm-Scripts auf dem Handy.
|
# Starten des Alarm-Scripts auf dem Handy.
|
||||||
ssh -i /root/.ssh/A72 root@$A72_ip '/data/scripts/morning-alarm.sh'
|
ssh -i /root/.ssh/A72 root@$A72_ip '/data/scripts/morning-alarm.sh' > /root/morning_alarm.log
|
||||||
|
|
||||||
# Farben ändern für mehr konzentration
|
# Farben ändern für mehr konzentration
|
||||||
while :; do
|
while :; do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user