initial commit

This commit is contained in:
2026-01-17 09:10:20 +00:00
commit 3a845bf532
23 changed files with 1816 additions and 0 deletions

26
legacy/pc_runner.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Bash Script To Power On PC and SSH into it.
MAC_ADDRESS="00:d8:61:c5:e8:69"
USER="zaine"
IP="192.168.0.135"
echo "Hang tight..."
# Call wakeonlan and capture the output
OUTPUT=$(wakeonlan "$MAC_ADDRESS" 2>&1) # 2>&1 captures both stdout and stderr
echo "wakeonlan output: $OUTPUT"
# Analyze the output (simple example)
if [[ $OUTPUT == *"Sending magic packet"* ]]; then
echo "Wake-on-LAN packet sent successfully."
else
echo "Error sending magic packet or no response: $OUTPUT"
fi
# Sleep for 15 seconds so that the PC can wake up
sleep 45
echo "Attempting to SSH into $USER@$IP..."
# Start SSH and let it take over the terminal
ssh -X "$USER@$IP"