diff --git a/README.mdown b/README.mdown index a3dcd83..96ca5a6 100644 --- a/README.mdown +++ b/README.mdown @@ -6,6 +6,4 @@ ### openvz: ### -* vzcreate.sh - script to create openvz containers and setting reasonable persystem defaults. -* addnat.sh - script to add SNAT to container with ip from private network -* fwdport.sh - script to forward port from host's external ip into container's internal network +openvz scripts moved to separate repo - https://github.com/CoolCold/openvz-tools diff --git a/copyenv b/copyenv index 7c3ba27..35feedc 100755 --- a/copyenv +++ b/copyenv @@ -68,10 +68,10 @@ if [ "x$AUTHCOPY" = "xYES" ];then if [ $? -eq 0 -a ! -z "$akey" ];then ssh "$RHOST" "mkdir -p ~/.ssh;chmod 700 .ssh;echo "$akey" > $AKEY_TMPL;chmod 600 $AKEY_TMPL" else - echo "$AKEY_FILE wasn't copied - empty/unable to read, skipping" + echo "$AKEY_FILE wasn't copyied - empty/unable to read, skipping" fi fi -for i in bin .vimrc .screenrc .profile .bashrc .gitconfig .hgrc ;do +for i in bin .vimrc .vim .screenrc .profile .bash_profile .bashrc .gitconfig .hgrc .tmux.conf ;do if [ -r $i ];then scp -r "$i" "$RHOST": fi diff --git a/openvz/vzcreate/addnat.sh b/openvz/vzcreate/addnat.sh deleted file mode 100755 index ec7c9d5..0000000 --- a/openvz/vzcreate/addnat.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -vzconfig=vzcreate.conf - -ARGS=1 -if [[ $# -ne "$ARGS" ]] -then - echo "usage: `basename $0` >" - echo "for example: `basename $0` 10.10.10.5" - exit 1 - -fi - -if [ -r $vzconfig ]; then - . $vzconfig -else - echo "failed to read config $vzconfig" - exit 2 -fi -nsstring="" -for i in $nameservers;do - #echo "nameserver is $i" - nsstring="$nsstring --nameserver $i" -done -#echo "my ip is $myip" - -if [ -z "$nsstring" ];then echo "nameservers list is empty!";exit 2;fi -if [ -z "$myip" ];then echo "myip is empty!";exit 2;fi - -iptables -t nat -A POSTROUTING -s $1 -o eth0 -j SNAT --to $myip diff --git a/openvz/vzcreate/fwdport.sh b/openvz/vzcreate/fwdport.sh deleted file mode 100755 index 72e2b5b..0000000 --- a/openvz/vzcreate/fwdport.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -ARGS=3 -if [[ $# -ne "$ARGS" ]] -then - echo "usage: `basename $0` " - echo "for example: `basename $0` 10.10.10.5 2221 22" - exit 1 - -fi - -#enabling forwarding for nginx -iptables -t nat -A PREROUTING -p tcp -d 87.118.90.42 --dport $2 -i eth0 -j DNAT --to-destination $1:$3 diff --git a/openvz/vzcreate/vzcreate.conf b/openvz/vzcreate/vzcreate.conf deleted file mode 100644 index 0f97aa9..0000000 --- a/openvz/vzcreate/vzcreate.conf +++ /dev/null @@ -1,4 +0,0 @@ -#nameserver should be space delimited -nameservers="10.10.40.1 127.0.0.1" -myip="1.1.1.1" - diff --git a/openvz/vzcreate/vzcreate.sh b/openvz/vzcreate/vzcreate.sh deleted file mode 100755 index 07614a3..0000000 --- a/openvz/vzcreate/vzcreate.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -vzconfig=vzcreate.conf - - -ARGS=5 -if [[ $# -lt "$ARGS" ]] -then - echo "usage: `basename $0`