sudo apt-get install open-iscsivi /etc/iscsi/iscsid.conf
| #!/bin/bash | |
| # add repository to sources.list | |
| cat << EOF >> /etc/apt/sources.list | |
| # webmin repository | |
| deb http://download.webmin.com/download/repository sarge contrib | |
| deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib | |
| EOF |
| #!/bin/bash | |
| cat << EOF > /etc/apt/sources.list | |
| deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
| deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
| deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
| deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
| deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse | |
| deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
| deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse |
| sudo apt-get install network-manager-openconnect openconnect |
| # put this in your bash profile (change the line below if you use .bash_profile) | |
| # refresh profile on USR1 signal | |
| trap 'eval $(PATH= /usr/libexec/path_helper -s) && source ~/.profile' USR1 | |
| # send USR1 signal to all bash instances | |
| reload_profile() { | |
| ps -xo pid,command | grep ' \-bash' | awk '{print $1}' | while read pid; do | |
| kill -USR1 $pid | |
| done |
| /etc/vpnc/post-connect.d/enable-ping.sh | |
| --------------------------------------- | |
| #!/bin/bash | |
| echo "Connected."; | |
| # enable host ping | |
| while [ ! -z "$(iptables -L | grep icmp-net-unreachable)" ]; do | |
| echo "==> delete icmp-net-unreachable"; | |
| iptables -D INPUT -p icmp -m icmp --icmp-type echo-request -j REJECT --reject-with icmp-net-unreachable; | |
| done |
| program=$1; | |
| tmp=$(mktemp); | |
| readelf -s $program | awk ' | |
| { | |
| if($4 == "FUNC" && $2 != 0) { | |
| print "# code for " $NF; | |
| print "b *0x" $2; | |
| print "commands"; | |
| print "silent"; | |
| print "bt 1"; |
| /ip pool | |
| add name=vpn-pool ranges=10.2.2.2-10.2.2.22 | |
| /ppp profile | |
| set [find name=default-encryption] dns-server=10.2.2.1 local-address=10.2.2.1 remote-address=vpn-pool | |
| /ppp secret | |
| add name=帳號 password=密碼 profile=default | |
| /interface l2tp-server server |
| sudo add-apt-repository ppa:mc3man/trusty-media | |
| sudo apt-get update | |
| sudo apt-get install ffmpeg |
| dest root / | |
| dest ram /tmp | |
| lists_dir ext /var/opkg-lists | |
| option overlay_root /overlay | |
| src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/base | |
| src/gz chaos_calmer_luci http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/luci | |
| src/gz chaos_calmer_packages http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/packages | |
| src/gz chaos_calmer_routing http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/routing | |
| src/gz chaos_calmer_telephony http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/telephony | |
| src/gz chaos_calmer_management http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/management |