From 9b604e681ef54ec92805d1ae5f94e2f327687793 Mon Sep 17 00:00:00 2001 From: Doofus100500 <86063046+Doofus100500@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:11:49 +0500 Subject: [PATCH] delete file after upload --- charts/selenium-grid/configs/uploader/rclone/entry_point.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/selenium-grid/configs/uploader/rclone/entry_point.sh b/charts/selenium-grid/configs/uploader/rclone/entry_point.sh index be4657514..211601353 100644 --- a/charts/selenium-grid/configs/uploader/rclone/entry_point.sh +++ b/charts/selenium-grid/configs/uploader/rclone/entry_point.sh @@ -27,6 +27,10 @@ do else [ "$FILE" != "" ] && [ "$DESTINATION" != "" ]; echo "Uploading ${FILE} to ${DESTINATION}" rclone --config ${UPLOAD_CONFIG_DIRECTORY}/${UPLOAD_CONFIG_FILE_NAME} ${UPLOAD_COMMAND} ${UPLOAD_OPTS} "${FILE}" "${DESTINATION}" + if [ $? -eq 0 ]; + then + rm -rf $FILE + fi fi if [ -f ${SE_VIDEO_FOLDER}/force_exit ] && [ ! -s ${SE_VIDEO_FOLDER}/uploadpipe ]; then