Remove session logging from runtest.sh and adjust argument display

This commit is contained in:
Yaro Kasear 2025-05-02 14:35:18 -05:00
parent b80adf89ef
commit 8301dd8744
2 changed files with 7 additions and 10 deletions

View file

@ -38,16 +38,6 @@ IFS=$'\n\t'
echo "Here are the arguments passed to the script: $@"
# === Start logging with 'script' safely ===
if [ -z "${SCRIPT_LOG_STARTED:-}" ]; then
export SCRIPT_LOG_STARTED=1
BOOT_ID=$(cat /proc/sys/kernel/random/boot_id)
LOG_FILE="${HOME}/${BOOT_ID}-session.log"
echo "[+] Starting session logging to $LOG_FILE"
exec script -q "$LOG_FILE" --return --flush --command "$0" "$@"
fi
# === Now start your real script ===
source settings.env

7
start-test.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
BOOT_ID=$(cat /proc/sys/kernel/random/boot_id)
LOG_FILE="${HOME}/${BOOT_ID}-session.log"
SCRIPT_PATH="$(realpath "$(dirname "$0")/runtest.sh")"
echo "[+] Starting session logging to $LOG_FILE"
exec script -q "$LOG_FILE" --return --flush --command "$SCRIPT_PATH $*"