diff --git a/serverPython/disable_screen.sh b/serverPython/disable_screen.sh new file mode 100644 index 0000000..2357a25 --- /dev/null +++ b/serverPython/disable_screen.sh @@ -0,0 +1,10 @@ +#!/bin/bash +DEVICE_IP="10.160.138.2:5555" + +# Dọn dẹp tiến trình cũ nếu có +pkill -f scrcpy + +echo "Đang tắt màn hình và khóa cảm ứng trên thiết bị $DEVICE_IP..." +# Chạy scrcpy ẩn dưới nền (nohup) +nohup scrcpy -s $DEVICE_IP --turn-screen-off --no-window > /dev/null 2>&1 & +echo "✅ Thành công! Màn hình đã tối đen, Bot vẫn hoạt động ẩn." diff --git a/serverPython/enable_screen.sh b/serverPython/enable_screen.sh new file mode 100644 index 0000000..a9e2f52 --- /dev/null +++ b/serverPython/enable_screen.sh @@ -0,0 +1,7 @@ +#!/bin/bash +echo "Đang khôi phục màn hình sáng và cảm ứng..." + +# Chỉ cần Kill tiến trình scrcpy, màn hình sẽ tự động sáng lại +pkill -f scrcpy + +echo "✅ Thành công! Điện thoại đã sáng đèn và có thể chạm lại bình thường."