This commit is contained in:
mofeng-git
2024-09-25 19:48:51 +08:00
parent 6764a77ea1
commit 144c1edd1b
2 changed files with 41 additions and 43 deletions

View File

@@ -1,9 +1,17 @@
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m'
cleanup() {
if [ "$OTG" == "1" ]; then
echo "Trying exit OTG Port..."
python -m kvmd.apps.otg stop
echo "Trying exit OTG Port..." \
&& python -m kvmd.apps.otg stop \
&& rm -r /run/kvmd/otg \
|| echo -e "${RED}Failed to exit OTG Port${NC}"
fi
exit 0
}