在首次发布应用时,应用的启停脚本是不存在的,需要在发布脚本里面判断,以防发布出错。
类似这种:
if [ x"bin/stop.sh" != x"" ];then
if [ -f "bin/stop.sh" ];then
! sh bin/stop.sh
else
echo 'failed'
fi
fi
if [ -f "bin/stop.sh" ];then
! sh bin/stop.sh
else
echo 'failed'
fi
fi
if [ x"[!STOP_SCRIPT]" != x"" ];then
if [ -f "[!STOP_SCRIPT]" ];then
! sh [!STOP_SCRIPT]
fi
fi