{"id":370,"date":"2016-10-25T16:23:41","date_gmt":"2016-10-25T08:23:41","guid":{"rendered":"http:\/\/play.datalude.com\/blog\/?p=370"},"modified":"2020-09-24T09:07:31","modified_gmt":"2020-09-24T01:07:31","slug":"getting-logwatch-to-print-out-a-list-of-apt-packages-with-upgrades","status":"publish","type":"post","link":"https:\/\/play.datalude.com\/blog\/2016\/10\/getting-logwatch-to-print-out-a-list-of-apt-packages-with-upgrades\/","title":{"rendered":"Getting logwatch to print out a list of apt packages with upgrades"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Useful one to have appear in your inbox in the morning. Have just done this on a server, so I thought I'd put it here to remind myself. This works for debian and Ubuntu variants, which have the apt command (a meta-script for the apt-get ecosystem)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In note form &#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following text to \/etc\/logwatch\/scripts\/services\/apt<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/bash\n\/usr\/bin\/apt list --upgradable<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following text to \/etc\/logwatch\/conf\/services\/apt.conf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># The title shown in the report.\nTitle = \"Packages to upgrade\"\n\n# The name of the log file group (file name). \n# e.g for \/etc\/logwatch\/conf\/logfiles\/apt.conf, we'd have Logfile = apt\nLogFile = NONE<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As we have NONE there, we don't need to create \/etc\/logwatch\/conf\/logfiles\/apt.conf.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Useful one to have appear in your inbox in the morning. Have just done this on a server, so I thought I'd put it here to remind myself. This works for debian and Ubuntu variants, which have the apt command (a meta-script for the apt-get ecosystem) In note form &#8230; Add the following text to &#8230; <a title=\"Getting logwatch to print out a list of apt packages with upgrades\" class=\"read-more\" href=\"https:\/\/play.datalude.com\/blog\/2016\/10\/getting-logwatch-to-print-out-a-list-of-apt-packages-with-upgrades\/\" aria-label=\"Read more about Getting logwatch to print out a list of apt packages with upgrades\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/comments?post=370"}],"version-history":[{"count":0,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/370\/revisions"}],"wp:attachment":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/media?parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/categories?post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/tags?post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}