{"id":243,"date":"2013-12-04T01:01:02","date_gmt":"2013-12-03T16:01:02","guid":{"rendered":"http:\/\/tech.akat.info\/?p=243"},"modified":"2014-09-16T01:13:47","modified_gmt":"2014-09-15T16:13:47","slug":"etccron-dailyapache2","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=243","title":{"rendered":"\/etc\/cron.daily\/apache2"},"content":{"rendered":"<p>\/etc\/cron.daily\/apache2 \u306b\u3064\u3044\u3066\u3001\u91cd\u8981\u306a\u30c4\u30fc\u30eb\u304b\u3068\u601d\u3044\u304d\u3084\u3001disk_cache\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3059\u308b\u30c4\u30fc\u30eb\u3060\u3063\u305f\u304a\u8a71<\/p>\n<pre class=\"brush: plain; title: \/etc\/cron.daily\/apache2; notranslate\" title=\"\/etc\/cron.daily\/apache2\">\r\n#!\/bin\/sh\r\n\r\n# run htcacheclean\r\n\r\n# \u30b3\u30de\u30f3\u30c9\u304c0\u4ee5\u5916\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3067\u7d42\u4e86\u3057\u305f\u5834\u5408\u3001\u4e00\u90e8\u306e\u5834\u5408\u3092\u9664\u3044\u3066\u5373\u5ea7\u306b\u7d42\u4e86\u3059\u308b\r\nset -e\r\n# \u672a\u5b9a\u7fa9\u306e\u5909\u6570\u3092\u53c2\u7167\u3059\u308b\u3068\u30a8\u30e9\u30fc\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\r\nset -u\r\n\r\n# htcacheclean,\/etc\/default\/apache2\u304c\u5b58\u5728\u3057\u306a\u3044\u3068exit\r\n&#x5B; -e \/usr\/sbin\/htcacheclean ] || exit 0\r\n&#x5B; -e \/etc\/default\/apache2 ]   || exit 0\r\n\r\n\r\n# edit \/etc\/default\/apache2 to change this\r\nHTCACHECLEAN_MODE=daemon\r\nHTCACHECLEAN_RUN=auto\r\nHTCACHECLEAN_SIZE=300M\r\nHTCACHECLEAN_PATH=\/var\/cache\/apache2\/mod_disk_cache\r\nHTCACHECLEAN_OPTIONS=&quot;&quot;\r\n\r\n# \/etc\/default\/apache2\u306b\u3088\u3063\u3066\u5148\u307b\u3069\u8a2d\u5b9a\u3057\u305f\u5909\u6570\u304c\u4e0a\u66f8\u304d\u3055\u308c\u308b\r\n. \/etc\/default\/apache2\r\n\r\n# cron\u3067\u306a\u3044\u5834\u5408\u3001exit\r\n&#x5B; &quot;$HTCACHECLEAN_MODE&quot; = &quot;cron&quot; ] || exit 0\r\n\r\n# HTCACHECLEAN_RUN\u304cyes\u3001\u307e\u305f\u306f\u3001auto\u304b\u3064disk_cache\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u6709\u52b9\u306e\u3068\u304d\u306e\u307fexit\u3057\u306a\u3044\r\n&#x5B; &quot;$HTCACHECLEAN_RUN&quot; = &quot;yes&quot;   ] ||\r\n( &#x5B; &quot;$HTCACHECLEAN_RUN&quot; = &quot;auto&quot; ] &amp;&amp; \\\r\n  &#x5B; -e \/etc\/apache2\/mods-enabled\/disk_cache.load ] )  || exit 0\r\n\r\n\r\n# -n:CPU\u4f7f\u7528\u306e\u512a\u5148\u5ea6\u3092\u6700\u4f4e\u306b\u3057\u3066\u52d5\u4f5c\u3055\u305b\u308b\r\n# -p:\u30c7\u30a3\u30b9\u30af\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\r\n# -l:\u30c8\u30fc\u30bf\u30eb\u3067\u306e\u30c7\u30a3\u30b9\u30af\u30ad\u30e3\u30c3\u30b7\u30e5\u30b5\u30a4\u30ba\u306e\u5236\u9650\u5024\u3092\u6307\u5b9a\u3059\u308b\r\n\/usr\/sbin\/htcacheclean  ${HTCACHECLEAN_OPTIONS} \\\r\n                        -p${HTCACHECLEAN_PATH}  \\\r\n                        -l${HTCACHECLEAN_SIZE}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/etc\/cron.daily\/apache2 \u306b\u3064\u3044\u3066\u3001\u91cd\u8981\u306a\u30c4\u30fc\u30eb\u304b\u3068\u601d\u3044\u304d\u3084\u3001disk_cache\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3059\u308b\u30c4\u30fc\u30eb\u3060\u3063\u305f\u304a\u8a71 #!\/bin\/sh # run htcacheclean # \u30b3\u30de [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/243"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=243"}],"version-history":[{"count":2,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/243\/revisions"}],"predecessor-version":[{"id":245,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/243\/revisions\/245"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}