ci: add purge droplet-agent to DO packer script

This commit is contained in:
Nicolas Giard 2022-11-09 17:04:07 -05:00 committed by GitHub
parent f77c6953a1
commit fff7f10dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,14 +8,16 @@ if [[ ! -d /tmp ]]; then
fi fi
chmod 1777 /tmp chmod 1777 /tmp
export DEBIAN_FRONTEND=noninteractive
apt-get -y update apt-get -y update
apt-get -y upgrade apt-get -o Dpkg::Options::="--force-confold" upgrade -q -y --force-yes
apt-get purge droplet-agent
apt-get -y autoremove
apt-get -y autoclean
rm -rf /tmp/* /var/tmp/* rm -rf /tmp/* /var/tmp/*
history -c history -c
cat /dev/null > /root/.bash_history cat /dev/null > /root/.bash_history
unset HISTFILE unset HISTFILE
apt-get -y autoremove
apt-get -y autoclean
find /var/log -mtime -1 -type f -exec truncate -s 0 {} \; find /var/log -mtime -1 -type f -exec truncate -s 0 {} \;
rm -rf /var/log/*.gz /var/log/*.[0-9] /var/log/*-???????? rm -rf /var/log/*.gz /var/log/*.[0-9] /var/log/*-????????
rm -rf /var/lib/cloud/instances/* rm -rf /var/lib/cloud/instances/*