Last active
October 2, 2015 18:14
-
-
Save gabtastic/12d57248e7d571bcbd67 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
dmidecode | grep -qi "Seneca" | |
rs=$? | |
if [ $rs ]; then | |
echo "Seneca, let's go..." 1>&2; | |
else | |
exit 1 | |
fi | |
ipmitool lan print 1 |grep -qi "172.16.10.5" | |
rs=$? | |
if [ $rs == 0 ]; then | |
service ipmi restart | |
ipmitool raw 0x30 0x70 0xc 1 0 | |
else | |
echo "already set to dedicated..." 1>&2; | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment