diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2020-01-21 13:29:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 13:29:54 -0500 |
commit | 1bcf337692090b7b3f16af72c924b199153f3120 (patch) | |
tree | f5e145f7e77121d65d27da39dcbc9da0f551e526 /etc/hstdp-2019.5/tasks/999-clean.sh | |
parent | baf286b2db71e82f41a909081d7d6eae090e8ede (diff) | |
parent | df956d197232e57a93c055d06996ec38b2653ed5 (diff) | |
download | docker-pipeline-1bcf337692090b7b3f16af72c924b199153f3120.tar.gz |
Add hstdp-2019.5
Diffstat (limited to 'etc/hstdp-2019.5/tasks/999-clean.sh')
-rwxr-xr-x | etc/hstdp-2019.5/tasks/999-clean.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/hstdp-2019.5/tasks/999-clean.sh b/etc/hstdp-2019.5/tasks/999-clean.sh new file mode 100755 index 0000000..7487b9c --- /dev/null +++ b/etc/hstdp-2019.5/tasks/999-clean.sh @@ -0,0 +1,18 @@ +#!/bin/bash -x +if [[ ! -f /.dockerenv ]]; then + echo "This script cannot be executed outside of a docker container." + exit 1 +fi + +rm -rf "${HOME}/.astropy" +rm -rf "${HOME}/.cache" +rm -rf "${HOME}"/* + +sudo yum clean all +sudo rm -rf /tmp/* +sudo rm -rf /var/cache/yum + +for logfile in /var/log/* +do + sudo truncate --size=0 "${logfile}" +done |