🐛 use MAC address from environment file

This commit is contained in:
Finn Christiansen 2025-06-09 22:26:23 +02:00
parent 7056e232d7
commit 27d2fc8b1e

View file

@ -14,7 +14,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
# Check if the payload indicates a user login event # Check if the payload indicates a user login event
if 'NotificationType' in post_data and 'AuthenticationSuccess' in post_data['NotificationType']: if 'NotificationType' in post_data and 'AuthenticationSuccess' in post_data['NotificationType']:
print("User login detected! Waking up NAS.") print("User login detected! Waking up NAS.")
send_magic_packet('1c:1b:0d:99:5c:48') send_magic_packet(os.getenv('MAC_ADDRESS', 'FF:FF:FF:FF:FF:FF'))
# Send a 200 OK response # Send a 200 OK response
self.send_response(200) self.send_response(200)