码迷,mamicode.com
首页 > 其他好文 > 详细

配置203.195.139.19

时间:2014-08-20 12:12:12      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   os   ar   art   div   log   

crontab -e

* * * * * /root/start.sh
*/20 * * * * /usr/sbin/ntpdate 0.centos.pool.ntp.org >>/root/ntp.log

 

vi /root/start.sh

#!/bin/bash
#判断进程是否存在,如果不存在就启动它
PIDS=`ps -ef |grep vpnbridge |grep -v grep | awk {print $2}`
if [ "$PIDS" != "" ]; then
echo "vpnbridge is runing!"
else
killall php-fpm
/usr/local/php/sbin/php-fpm
/usr/local/vpnbridge/vpnbridge start
sleep 3
ifconfig tap_vpn 10.96.84.69/28
ip route replace 10.96.81.0/28 via 10.96.84.65
ip route replace 10.96.81.16/28 via 10.96.84.65
ip route replace 10.96.81.32/28 via 10.96.84.65
ip route replace 10.96.81.192/28 via 10.96.84.65
killall nginx
/usr/local/nginx/sbin/nginx
fi

 

配置203.195.139.19,布布扣,bubuko.com

配置203.195.139.19

标签:style   blog   color   os   ar   art   div   log   

原文地址:http://www.cnblogs.com/firadio/p/3924126.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!