Created
February 1, 2016 02:35
-
-
Save AdrianKoshka/4bd297bc6d2b9f0926cc to your computer and use it in GitHub Desktop.
A little WoL script for doing updates.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BCAST_IP="your broadcast IP here" | |
MAC_ADDR="your mac address here" | |
wakeonlan -i $BCAST_IP $MAC_ADDR #send magic packet to computer | |
echo "Waiting for boot" | |
sleep 2m # this is just filler, waits two minutes for computer to boot. | |
ssh everyone@192.168.0.6 -t "sudo apt-get update; sudo apt-get upgrade; sudo poweroff" | |
#runs commands, then shuts computer down |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment