{"id":20,"date":"2015-05-20T09:54:30","date_gmt":"2015-05-20T07:54:30","guid":{"rendered":"http:\/\/it.ynip.de\/?p=20"},"modified":"2015-06-03T16:07:02","modified_gmt":"2015-06-03T14:07:02","slug":"fail2ban-sauber-neustarten-per-cron-script","status":"publish","type":"post","link":"https:\/\/it.ynip.de\/?p=20","title":{"rendered":"fail2ban &#8211; sauber neustarten per CRON-Script"},"content":{"rendered":"<p>Da der Prozess nicht immer sauber beendet wird, Pr\u00fcfung ob der Prozess noch l\u00e4uft (kill) oder nicht.<\/p>\n<p><code>restart_fail2ban.sh<br \/>\n#!\/bin\/bash<\/p>\n<p>export BLA=`ps ax |grep 'fail2ban'|grep -v 'grep'|grep -v 'fail2ban.log'|grep -v 'restart_fail2ban.sh' | awk '{print $1}'`<\/p>\n<p>\/etc\/init.d\/fail2ban stop<\/p>\n<p>export UFF=`ps ax |grep 'fail2ban'|grep -v 'grep'|grep -v 'fail2ban.log'|grep -v 'restart_fail2ban.sh' | awk '{print $1}'`<\/p>\n<p>if [[ $BLA = $UFF ]]<br \/>\n then<br \/>\n    kill -9 $BLA<br \/>\nfi<\/p>\n<p>\/etc\/init.d\/fail2ban start<br \/>\necho \"Fail2Ban-NEUSTART\" | mail vorname.nachname@domain.de -s \"Fail2Ban-NEUSTART\"<\/p>\n<p>#EOF<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Da der Prozess nicht immer sauber beendet wird, Pr\u00fcfung ob der Prozess noch l\u00e4uft (kill) oder nicht. restart_fail2ban.sh #!\/bin\/bash export BLA=`ps ax |grep &#8218;fail2ban&#8217;|grep -v &#8218;grep&#8217;|grep -v &#8218;fail2ban.log&#8217;|grep -v &#8218;restart_fail2ban.sh&#8216; | awk &#8218;{print $1}&#8217;` \/etc\/init.d\/fail2ban stop export UFF=`ps ax |grep &#8218;fail2ban&#8217;|grep -v &#8218;grep&#8217;|grep -v &#8218;fail2ban.log&#8217;|grep -v &#8218;restart_fail2ban.sh&#8216; | awk &#8218;{print $1}&#8217;` if [[ $BLA = &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/it.ynip.de\/?p=20\" class=\"more-link\"><span class=\"screen-reader-text\">\u201efail2ban &#8211; sauber neustarten per CRON-Script\u201c<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12,13,10,8,4],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-fail2ban","tag-firewall","tag-iptables","tag-linux","tag-tools"],"_links":{"self":[{"href":"https:\/\/it.ynip.de\/index.php?rest_route=\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.ynip.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.ynip.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.ynip.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/it.ynip.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20"}],"version-history":[{"count":4,"href":"https:\/\/it.ynip.de\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions"}],"predecessor-version":[{"id":24,"href":"https:\/\/it.ynip.de\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions\/24"}],"wp:attachment":[{"href":"https:\/\/it.ynip.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.ynip.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.ynip.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}