This repository has been archived on 2019-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
Manager/plugins/maintenance/main.sh

19 lines
422 B
Bash

if [ -x "$(command -v docker)" ]; then
output "info Clearing Docker remainings"
docker system prune --all -f
fi
case $(uname -rv) in
*Ubuntu*)
output "info Clearing & Updating APT"
apt-get -y update
apt-get -y autoclean
apt-get -y autoremove
;;
esac
output "info Clearing logs"
if [ -x "$(command -v nginx)" ]; then
truncate -s 0 "${LOGPATH:-/var/log/nginx/*.*}"
fi
journalctl --vacuum-size=20M