mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
修复 otg 无法使用问题
This commit is contained in:
parent
d7a9f0c969
commit
8aee3ac70d
@ -134,7 +134,12 @@ fi
|
|||||||
if [ "$OTG" == "1" ]; then
|
if [ "$OTG" == "1" ]; then
|
||||||
echo "Trying OTG Port..."
|
echo "Trying OTG Port..."
|
||||||
python -m kvmd.apps.otg start
|
python -m kvmd.apps.otg start
|
||||||
|
if [ -f /dev/hidg0 ] && [ -f /dev/hidg1 ]; then
|
||||||
|
ln -s /dev/hidg1 /dev/kvmd-hid-mouse && ln -s /dev/hidg0 /dev/kvmd-hid-keyboard
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo -e "${GREEN}One-KVM starting...${NC}"
|
echo -e "${GREEN}One-KVM starting...${NC}"
|
||||||
exec supervisord -c /etc/kvmd/supervisord.conf
|
exec supervisord -c /etc/kvmd/supervisord.conf
|
||||||
15
configs/kvmd/clean_when_exit.sh
Executable file
15
configs/kvmd/clean_when_exit.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/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
|
||||||
@ -42,3 +42,15 @@ stopasgroup=true
|
|||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes = 0
|
stdout_logfile_maxbytes = 0
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
|
|
||||||
|
[program:clean_when_exit]
|
||||||
|
command=/etc/kvmd/clean_when_exit.sh
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
startsecs=10
|
||||||
|
priority=200
|
||||||
|
stopasgroup=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes = 0
|
||||||
|
redirect_stderr=true
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user