#!/bin/bash set -euo pipefail apt-get install -y atop cat > /etc/default/atop <<'EOF' LOGINTERVAL=420 LOGGENERATIONS=28 LOGPATH=/var/log/atop LOGOPTS= EOF systemctl enable --now atop systemctl restart atop systemctl is-active atop pgrep -a atop test "$(pgrep -a atop | grep -c ' 420$')" -ge 1 ls -l /var/log/atop/