Files
yatm/scripts/encrypt
T
Samuel Cui 4fef653b71 Prepare YATM v1.0.0-alpha.2
Unify file queries and Scan execution, retain indexed Identical results,
improve Job and Preview workflows, and verify release packaging.
2026-10-05 19:08:49 +08:00

20 lines
347 B
Bash
Executable File

#!/usr/bin/env bash
set -ex;
mkdir -p "${TAPE_DIR}"
exec > >(tee -a "${TAPE_DIR}/ltfs.log") 2>&1
mt -f "${DEVICE}" load
sleep 5
for i in {1..60}; do
if stenc -f "${DEVICE}" -e on -k "${KEY_FILE}" -kd "${TAPE_BARCODE}" -a 1 --ckod; then
sleep 3
exit 0
fi
if (( i == 60 )); then
exit 1
fi
sleep 5
done