From 464be641061cd7aae2fed0db021d763daee8ea0b Mon Sep 17 00:00:00 2001 From: caskd Date: Tue, 1 Jan 2019 22:07:06 +0100 Subject: [PATCH] Take care of other files that build up too --- manager | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/manager b/manager index 2878b77..3aae058 100755 --- a/manager +++ b/manager @@ -3,16 +3,21 @@ ## Functions function maitenance { - output "info" "Removing stopped containers..." + output "info" "Removing stopped containers" dp "container" - output "info" "Pruning unused images..." + output "info" "Pruning unused images" dp "image" - output "info" "Pruning unused volumes..." + output "info" "Pruning unused volumes" dp "volume" - output "info" "Clearing logs..." + output "info" "Clearing & Updating APT" + apt-get update + apt-get clean + apt-get autoclean + apt-get autoremove + output "info" "Clearing logs" rm -v /var/log/nginx/*.* + journalctl --vacuum-size=20M nginx -s reload - output "info" "Restarting Telegraf to update log files..." systemctl restart telegraf }