This file contains hidden or 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 | |
host=$1 | |
port=$2 | |
rc=$(curl -I http://$host:$port/stats 2>/dev/null | grep -c 'HTTP/1.1 200 OK') | |
if [[ $rc -eq 1 ]]; then | |
exit 0 | |
else |
This file contains hidden or 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 | |
[[ -d /Library/Internet\ Plug-Ins/disabled ]] || sudo mkdir -p /Library/Internet\ Plug-Ins/disabled | |
sudo rm -rf /Library/Internet\ Plug-Ins/disabled/JavaAppletPlugin.plugin | |
sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled | |
sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws | |
echo "Switched to Java6, exit" |
This file contains hidden or 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 | |
ip_file=$1 | |
if [[ -s $ip_file ]]; then | |
iptables -F -t nat | |
while read ip | |
do | |
iptables -t nat -A POSTROUTING -s $ip -j MASQUERADE | |
done <$ip_file | |
else |
This file contains hidden or 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 | |
if [[ $# -ne 2 ]]; then | |
echo "./enable_alternative_gw.sh original_gw alternative_gw" | |
exit 1 | |
fi | |
original_gw=$1 | |
gw=$2 |
This file contains hidden or 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
options { | |
listen-on port 53 { 127.0.0.1; }; | |
directory "/var/named"; | |
dump-file "/var/named/data/cache_dump.db"; | |
statistics-file "/var/named/data/named_stats.txt"; | |
memstatistics-file "/var/named/data/named_mem_stats.txt"; | |
forwarders { 114.114.114.114; 114.114.115.115; }; | |
forward only; |
This file contains hidden or 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
#/tmp/openvpncl/openvpn.conf | |
ca /tmp/openvpncl/ca.crt | |
cert /tmp/openvpncl/client.crt | |
key /tmp/openvpncl/client.key | |
management 127.0.0.1 5001 | |
management-log-cache 50 | |
verb 4 | |
mute 5 | |
log-append /var/log/openvpncl |
OlderNewer