Make a snapshot first! Upgrading from 2013Q1 to 2013Q3 because I needed newer nginx.
edit the files at:
/opt/local/etc/pkg_install.conf
/opt/local/etc/pkgin/repositories.conf
| ## Install necessary packages | |
| pkgin up | |
| pkgin -y in \ | |
| bash \ | |
| coreutils \ | |
| curl \ | |
| gcc47 \ | |
| gcc47-runtime \ | |
| gmake \ | |
| icu \ |
| #!/bin/sh | |
| # Cisco Anyconnect CSD wrapper for OpenConnect | |
| CSTUB="$HOME/.cisco/hostscan/bin/cstub" | |
| $ARCH=$(uname -m) | |
| if [[ "$ARCH" == "x86_64" ]] | |
| then |
| <?php | |
| define('APP_PATH', dirname(__FILE__)); | |
| define('DATA_FILE', APP_PATH. '/sms.htdata'); | |
| if ($_SERVER['REQUEST_METHOD'] == 'POST') { //tasker提交 | |
| if (!isset($_POST['c'])) { | |
| die('Invalid Request!'); | |
| } else { | |
| $data = ''; | |
| if (file_exists(DATA_FILE)) { //读入已有数据 |
| @echo off | |
| :: Path to Sublime Text installation dir. | |
| SET stPath=%~dp0sublime_text.exe | |
| SET stPathOnly=%~dp0 | |
| :: Key name for the registry entries. | |
| SET UserEntry=Sublime Text | |
| SET AdminEntry=Sublime Text As Admin | |
| :: Context menu texts. | |
| SET "UserMenuText=Open with Sublime(&-)" | |
| SET "AdminMenuText=Open with Sublime As Admin(&+)" |
##ss-redir 的 iptables 配置(透明代理)
透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则
创建 /etc/ss-redir.json 本地监听 7777
运行ss-redir -v -c /etc/ss-redir.json
iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
| route = 8.0.0.0/255.0.0.0 | |
| route = 58.0.0.0/255.0.0.0 | |
| route = 23.0.0.0/255.0.0.0 | |
| route = 117.0.0.0/255.0.0.0 | |
| route = 199.0.0.0/255.0.0.0 | |
| route = 190.0.0.0/255.0.0.0 | |
| route = 198.0.0.0/255.0.0.0 | |
| route = 173.0.0.0/255.0.0.0 | |
| route = 174.0.0.0/255.0.0.0 | |
| route = 168.0.0.0/255.0.0.0 |
| #!/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} |
| #!/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 |
You can find the MAC address for LAN1/eth0 (not the BMC MAC) via the SuperMicro IPMI interface by running the following command:
$ ipmitool -U $IPMI_USER -P $IPMI_PASS -H $IPMI_HOST raw 0x30 0x21 | tail -c 18The eth0 MAC address will be output in this format:
00 25 90 f0 be ef