One-KVM/configs/kvmd/clean_when_exit.sh
2024-09-20 21:22:58 +08:00

15 lines
209 B
Bash
Executable File

#!/bin/bash
cleanup() {
if [ "$OTG" == "1" ]; then
echo "Trying exit OTG Port..."
python -m kvmd.apps.otg stop
fi
exit 0
}
trap cleanup SIGTERM
while true; do
sleep 3600
done