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/ash | |
# wget https://gist.githubusercontent.com/aelveborn/e0faab9185256eeb86ad/raw/ -O ipredator-iptables.sh | |
# chmod 755 ipredator-iptables.sh | |
# and modify your local ip in the script | |
enableRules() { | |
if [ -f /etc/ipredator/iptables.orig ]; then | |
echo "Ipredator iptables rules already enabled!" | |
else |
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
# Replace o1234567890 with your OpenVPN id. To get your id, start the VPN and run ps|grep client_o | |
# Replace YOUR_VPN_NAME with the name of your VPN profile in DSM 5 admin panel. | |
if echo `ifconfig tun0` | grep -q "00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00" | |
then | |
echo "VPN is running" | |
else | |
echo conf_id=o1234567890 > /usr/syno/etc/synovpnclient/vpnc_connecting | |
echo conf_name=YOUR_VPN_NAME >> /usr/syno/etc/synovpnclient/vpnc_connecting | |
echo proto=openvpn >> /usr/syno/etc/synovpnclient/vpnc_connecting |
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 | |
watch grep \"cpu MHz\" /proc/cpuinfo |
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 | |
status=$(head /sys/devices/system/cpu/intel_pstate/no_turbo | grep -o '[0-1]') | |
if [ $status = 0 ]; then | |
echo "Switching CPU-turbo: OFF" | |
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo | |
else | |
echo "Switching CPU-turbo: ON" | |
echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo |