#!/bin/bash

# Logging functionality for dtic-BKPs execution
LOG_FILE="./logs/runDtic-BKPs.log"
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')

echo "[$TIMESTAMP] Starting dtic-BKPs application via screen" >> "$LOG_FILE"

# Execute the Ruby application in screen with relative path and start detached
screen -S dtic-BKPs_session -d -m ./dtic-BKPs_app.rb "$1"

# Log completion (note: this will execute immediately as screen detaches)
echo "[$TIMESTAMP] dtic-BKPs screen session launched" >> "$LOG_FILE"