{"id":47908,"date":"2020-03-07T20:56:12","date_gmt":"2020-03-07T12:56:12","guid":{"rendered":"http:\/\/4563.org\/?p=47908"},"modified":"2020-03-07T20:56:12","modified_gmt":"2020-03-07T12:56:12","slug":"%e5%86%8d%e6%ac%a1%e6%b1%82%e5%8a%a9%ef%bc%8csh-%e8%84%9a%e6%9c%ac%e5%a4%a7%e4%bd%ac%e8%bf%9b%e6%9d%a5%e7%9c%8b%e7%9c%8b%e6%88%91%e8%bf%99%e4%b8%aa%e6%98%af%e5%95%a5%e9%97%ae%e9%a2%98%ef%bc%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=47908","title":{"rendered":"\u518d\u6b21\u6c42\u52a9\uff0cSH \u811a\u672c\u5927\u4f6c\u8fdb\u6765\u770b\u770b\u6211\u8fd9\u4e2a\u662f\u5565\u95ee\u9898\uff01"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>cyclists<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u518d\u6b21\u6c42\u52a9\uff0cSH \u811a\u672c\u5927\u4f6c\u8fdb\u6765\u770b\u770b\u6211\u8fd9\u4e2a\u662f\u5565\u95ee\u9898\uff01<\/h3>\n<p>  \t\t\u611f\u8c22\u4e4b\u524d\u5e16\u5b50\u91cc\u768412\u697c\u5927\u4f6c\u5e2e\u6211\u5199\u4e86\u4e2a\u811a\u672c\uff0c\u7531\u4e8e\u4ed6\u5de5\u4f5c\u539f\u56e0\uff0c\u4e0d\u592a\u65b9\u4fbf\u7ecf\u5e38\u6253\u6270\u522b\u4eba\u3002<\/p>\n<p>  # !\/bin\/bash -x<br \/>  #&nbsp; &nbsp; filename:running.sh<br \/>  curr_run_time=`date +%s`<br \/>  phat=&quot;\/var\/log\/rundate.log&quot;<br \/>  ni=$(date +20%y-%m-%d)<br \/>  if [ ! -n &quot;${1}&quot; ]; then<br \/>  echo &quot;Please enter a specified value&quot;<br \/>   else<br \/>  &nbsp; &nbsp;value=&quot;${1}&quot;<br \/>  &nbsp; &nbsp;if [ ! -f &quot;${phat}&quot; ]; then<br \/>  &nbsp; &nbsp;touch &quot;${phat}&quot;<br \/>  &nbsp; &nbsp;echo -e &quot;1|${ni}&quot; &gt; &quot;${phat}&quot;<br \/>   else<br \/>  &nbsp; &nbsp;i=$(cat &quot;${phat}&quot; | sed &#8216;\/^s*$\/d&#8217; | awk -F &quot;|&quot; &#8216;{ print $1 }&#8217;)<br \/>  &nbsp; &nbsp;ii=$(cat &quot;${phat}&quot; | sed &#8216;\/^s*$\/d&#8217; | awk -F &quot;|&quot; &#8216;{ print $2 }&#8217;)<br \/>  &nbsp; &nbsp;if [ &quot;${ii}&quot; != &quot;${ni}&quot; ]; then<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;if [ &quot;${i}&quot; != &quot;${value}&quot; ]; then<br \/>  &nbsp; &nbsp;li=$(($i+1))<br \/>  &nbsp; &nbsp;echo -e &quot;${li}|${ni}&quot; &gt; &quot;${phat}&quot;<br \/>   else<br \/>  &nbsp; &nbsp;bash mkdir xxx<br \/>  &nbsp; &nbsp;sed -i &quot;4s\/  * \/$curr_run_time\/&quot; mkdir xxx<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;echo -e &quot;1|${ni}&quot; &gt; &quot;${phat}&quot;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;fi<br \/>  &nbsp; &nbsp;fi<br \/>  &nbsp; &nbsp; fi<br \/>  fi<\/p>\n<p>  \u6211\u6267\u884c bash running.sh 1 \u7684\u65f6\u5019\uff0crundate.log\u91cc\u4f1a\u81ea\u52a8\u5199\u5165\u65e5\u671f\uff0c\u4f46\u662froot\u6839\u76ee\u5f55\u5e76\u6ca1\u6709\u521b\u5efa xxx \u6587\u4ef6\uff0c\u628a\u4e0a\u8ff0\u91cc\u7684bash mkdir xxx\u4ee3\u7801\u66ff\u6362\u6210 bash acme.sh \u2014renew-all \uff0c\u6211\u53bbacme.sh.log\u65e5\u5fd7\u91cc\u770b\u4e5f\u6ca1\u6709\u6700\u65b0\u6267\u884c\u65f6\u95f4\u3002<\/p>\n<p>  \u5404\u4f4d\u70ed\u5fc3\u5927\u4f6c\u4eec\u53ef\u4ee5\u5e2e\u5fd9\u770b\u770b\u5417\uff1f\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h2o<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e0d\u5c31\u662f\u4e2a\u5b9a\u671f\u7533\u8bf7\u8bc1\u4e66\u5417\uff0c\u7528\u641e\u7684\u8fd9\u4e48\u590d\u6742\u5417\uff0c\u4e00\u5927\u5806\u73b0\u6210\u7684\u4e0d\u7528\uff1f\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cyclists<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\th2o \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-7 20:55<br \/>  \u4e0d\u5c31\u662f\u4e2a\u5b9a\u671f\u7533\u8bf7\u8bc1\u4e66\u5417\uff0c\u7528\u641e\u7684\u8fd9\u4e48\u590d\u6742\u5417\uff0c\u4e00\u5927\u5806\u73b0\u6210\u7684\u4e0d\u7528\uff1f<\/p>\n<p> MJJ\u5728\u4e8e\u6298\u817e\uff0c\u4e50\u8da3\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5343\u725b<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\thttps:\/\/s2.ax1x.com\/2020\/03\/07\/3jDaL9.png<br \/>  \u6211\u89c9\u5f97\u4f60\u591aecho\u51e0\u53e5\u5e94\u8be5\u53ef\u4ee5\u641e\u5b9a\u7684\u3002\u3002\u3002\u3002\u6211\u53ea\u662f\u683c\u5f0f\u5316\u4e86\u4e00\u4e0b\u4ee3\u7801\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cyclists<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5343\u725b \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-7 21:08<br \/>  \u6211\u89c9\u5f97\u4f60\u591aecho\u51e0\u53e5\u5e94\u8be5\u53ef\u4ee5\u641e\u5b9a\u7684\u3002\u3002\u3002\u3002\u6211\u53ea\u662f\u683c\u5f0f\u5316\u4e86\u4e00\u4e0b\u4ee3\u7801<\/p>\n<p> \u5927\u4f6c\u725b\u76ae\uff0c\u6709\u5565\u89e3\u51b3\u65b9\u6848\u5417\uff1f\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>cyclists \u5927\u4f6c\u6709\u8bdd\u8bf4 : &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/47908"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47908"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/47908\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47908"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}