added addtables script

This commit is contained in:
coderaiser 2013-05-08 12:10:25 -04:00
parent df460bbc89
commit 22a8346c33
4 changed files with 25 additions and 13 deletions

View file

@ -13,6 +13,8 @@ dispatch
* Moved loading functions to Loader object in DOM module.
* Added addtables script'
2012.04.22, v0.2.0

8
shell/addtables.sh Normal file
View file

@ -0,0 +1,8 @@
#!/bin/sh
su iptables -t nat -L # look rules before
su iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
su iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 4430
su iptables -t nat -L # look reles after
#su iptables -t nat -D PREROUTING 1
#su iptables -t nat -D PREROUTING 2

View file

@ -1,12 +1,13 @@
kill -9 `ps ax|grep node-openshift|grep -v grep|awk '{print $1}'`
# print finded process
ProcessList=`ps ax|grep node-openshift`
echo $ProcessList
# getting pid of process
PID=`echo "${ProcessList}"|grep -v grep|awk '{print $1}'`
echo $PID
#kill it
if test ! $PID
then echo 'process not found'
else kill -9 $PID && echo 'killed process'
#!/bin/sh
kill -9 `ps ax|grep node-openshift|grep -v grep|awk '{print $1}'`
# print finded process
ProcessList=`ps ax|grep node-openshift`
echo $ProcessList
# getting pid of process
PID=`echo "${ProcessList}"|grep -v grep|awk '{print $1}'`
echo $PID
#kill it
if test ! $PID
then echo 'process not found'
else kill -9 $PID && echo 'killed process'
fi

View file

@ -1,3 +1,4 @@
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out certrequest.csr
#!/bin/sh
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out certrequest.csr
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem