Remove session logging from runtest.sh and adjust argument display
This commit is contained in:
parent
b80adf89ef
commit
8301dd8744
2 changed files with 7 additions and 10 deletions
10
runtest.sh
10
runtest.sh
|
@ -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
7
start-test.sh
Normal 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 $*"
|
Loading…
Add table
Add a link
Reference in a new issue