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/bash | |
payload=$(cat <<EOF | |
<?xml version="1.0" encoding="utf-8"?> | |
<s:Envelope | |
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | |
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> | |
<s:Body> | |
<u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /> | |
</s:Body> | |
</s:Envelope> |
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
<?php | |
function folderSize ($dir) | |
{ | |
$size = 0; | |
foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) { | |
$size += is_file($each) ? filesize($each) : folderSize($each); | |
} |
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 | |
# Loads and mounts an ISO over SMB via the | |
# SuperMicro IPMI web interface | |
# | |
# usage: supermicro-mount-iso.sh <ipmi-host> <smb-host> <path> | |
# e.g.: supermicro-mount-iso.sh 10.0.0.1 10.0.0.2 '\foo\bar\windows.iso' | |
set -x |
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 | |
# Issues a reset of the SuperMicro BMC via the web interface | |
# | |
# usage: supermicro-bmc-reset.sh <ipmi-host> | |
# e.g.: supermicro-bmc-reset.sh 10.0.0.1 | |
# | |
set -x |
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 | |
# Retrieves the plaintext JNLP from a SuperMicro IPMI webserver | |
# Usage: supermicro-java-console.sh <hostname> | |
# supermicro-java-console.sh 10.1.2.34 > login.jnlp | |
set -x | |
HOST="$1" | |
IPMI_USER=${IPMI_USER:-ADMIN} |