ORC的启动脚本的封装脚本

这种是在生成shell的方式时,都shell的一种封装,尽量在shell用上去,看着简洁点。

#####################################################################                                                                                                     
# usage:                                                                                                                                                                  
# sh start.sh -- start application @dev                                                                                                                                   
# sh start.sh ${env} -- start application @${env}                                                                                                                         
                                                                                                                                                                          
# examples:                                                                                                                                                               
# sh start.sh prod -- use conf/nginx-prod.conf to start OpenResty                                                                                                         
# sh start.sh -- use conf/nginx-dev.conf to start OpenResty                                                                                                               
#####################################################################                                                                                                     
                                                                                                                                                                          
if [ -n "$1" ];then                                                                                                                                                       
    PROFILE="$1"                                                                                                                                                          
else                                                                                                                                                                      
    PROFILE=dev                                                                                                                                                           
fi                                                                                                                                                                        
                                                                                                                                                                          
if  [ $2 = "start" ];then                                                                                                                                                 
    echo "start"                                                                                                                                                          
    sh ./build/start.sh ${PROFILE}                                                                                                                                        
elif [ $2 = "stop" ];then                                                                                                                                                 
    echo "stop"                                                                                                                                                           
    sh ./build/stop.sh ${PROFILE}                                                                                                                                         
elif [ $2 = "reload" ];then                                                                                                                                               
    echo "reload"                                                                                                                                                         
    sh ./build/reload.sh ${PROFILE}                                                                                                                                       
else                                                                                                                                                                      
    echo "Input parameter error!"                                                                                                                                         
fi                                                                                                                                                                        
   

糖果

糖果
LUA从入门到放弃

Moonscript如何显示复选框

Moonscript如何显示复选框 Continue reading

Lapis框架的常用处理方法

Published on March 02, 2017