diff --git a/bin/reset_bubble_logs b/bin/reset_bubble_logs new file mode 100755 index 00000000..77d55dfb --- /dev/null +++ b/bin/reset_bubble_logs @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ +# +# +# Truncate all bubble logs +# +BUBBLE_LOGS_DIR=/var/log/bubble +if [[ ! -d ${BUBBLE_LOGS_DIR} ]] ; then + echo "BUBBLE_LOGS_DIR not found, nothing to truncate: ${BUBBLE_LOGS_DIR}" + exit 0 +fi + +find ${BUBBLE_LOGS_DIR} -type f | while read log ; do + cat /dev/null > ${log} && echo "truncated ${log}" || echo "error truncating ${log}" +done diff --git a/bubble-server/src/main/resources/ansible/bubble_scripts.txt b/bubble-server/src/main/resources/ansible/bubble_scripts.txt index 2248261e..1a354f8b 100644 --- a/bubble-server/src/main/resources/ansible/bubble_scripts.txt +++ b/bubble-server/src/main/resources/ansible/bubble_scripts.txt @@ -19,4 +19,5 @@ install_packer.sh rkeys rmembers rdelkeys -mitm_pid \ No newline at end of file +mitm_pid +reset_bubble_logs \ No newline at end of file