https://www.gravatar.com/avatar/5f48da38e786436afece6f2e46196202?s=240&d=mp

Linux Shell

OpenSUSE13.1来了,进击吧,绿蜥蜴!

//statics.lshell.com/Release-Geeko-Biting-KDE-300x259.png

     亲爱的贡献者们、朋友们和粉丝们:新版来啦!八个月的筹划、打包、添加功能、修复故障、测试然后修复更多的故障为您带来了自由开源社区所能提供的最好产物,带有我们绿色之触、稳定卓越的:openSUSE 13.1!将在北京时间2013年11月19日20:00准时发布

Ripple 送币

Ripple是一套分布式的货币支付和兑换协议,为了让大家更好的了解ripple,最近Ripple Labs对github用户有送币活动。

GITHUB账户可领2020个,价值70软妹币

OpenShift宕机自动重启脚本

小博是运行在OpenShift云平台上面的,偶尔会遇到宕机的情况!

最近在复习shell,顺手写个shell脚本监测网站运行情况,



  
#!/bin/bash  
#配置你的Openshift ssh用户名  
sshid=52c21fde5973caed4d0003c0  
#脚本运行部分  
curl -I www.ansen.org 2> /dev/null | head -1 | grep -q 200  
s=$?  
  
let t=`date +"%M"`%10  
if [ $t -eq 0 ];  
then  
  
if [ $s != 0 ];  
then  
  
/usr/bin/gear stop 2>&1 /dev/null  
/usr/bin/gear start 2>&1 /dev/null  
echo "`date +"%Y-%m-%d %I:%M:%S"` restarted" > /var/lib/$sshid/app-root/data/web_error.log  
fi  
else  
echo "`date +"%Y-%m-%d %I:%M:%S"` is ok" > /var/lib/openshift/$sshid/app-root/data/web_run.log  
fi

  

链接到~/app-root/repo/.openshift/cron/minutely里面,每10分钟检测一次,如果网站宕机了,自动重启app