mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
fixed os freezes
This commit is contained in:
3
os/platforms/v1/99-pikvm.conf
Normal file
3
os/platforms/v1/99-pikvm.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# https://github.com/raspberrypi/linux/issues/1753
|
||||
vm.dirty_background_bytes = 5
|
||||
vm.dirty_writeback_centisecs = 25
|
||||
@@ -18,7 +18,7 @@ http {
|
||||
keepalive_timeout 10;
|
||||
# gzip on;
|
||||
|
||||
upstream kvm_ws {
|
||||
upstream kvmd {
|
||||
server localhost:8081 fail_timeout=0s max_fails=0;
|
||||
}
|
||||
|
||||
@@ -46,9 +46,26 @@ http {
|
||||
|
||||
location /kvm/ws {
|
||||
rewrite /kvm/ws /ws break;
|
||||
proxy_pass http://kvm_ws;
|
||||
proxy_pass http://kvmd;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_connect_timeout 7d;
|
||||
proxy_send_timeout 7d;
|
||||
proxy_read_timeout 7d;
|
||||
}
|
||||
|
||||
location /kvm/msd/write {
|
||||
rewrite /kvm/msd/write /msd/write break;
|
||||
proxy_pass http://kvmd;
|
||||
limit_rate 6250k;
|
||||
limit_rate_after 50k;
|
||||
client_max_body_size 0;
|
||||
proxy_request_buffering off;
|
||||
}
|
||||
|
||||
location /kvm {
|
||||
rewrite /kvm/?(.*) /$1 break;
|
||||
proxy_pass http://kvmd;
|
||||
}
|
||||
|
||||
location /video {
|
||||
|
||||
@@ -5,14 +5,16 @@ set -x
|
||||
. ../functions.sh
|
||||
|
||||
|
||||
cp config.txt "$FS/boot/config.txt"
|
||||
pkg_install \
|
||||
kvmd \
|
||||
mjpg-streamer-pikvm \
|
||||
nginx
|
||||
|
||||
cp config.txt "$FS/boot/"
|
||||
cp 99-pikvm.conf "$FS/etc/sysctl.d/"
|
||||
cp index.html "$FS/srv/http/"
|
||||
cp kvmd.yaml "$FS/etc/"
|
||||
cp nginx.conf "$FS/etc/nginx/"
|
||||
|
||||
rpi systemctl enable kvmd
|
||||
rpi systemctl enable nginx
|
||||
|
||||
Reference in New Issue
Block a user