支持配置文件目录挂载,删除多余文件

-v ./kvmd_config:/etc/kvmd
This commit is contained in:
mofeng-git
2024-09-15 11:18:03 +08:00
parent 777b823fb9
commit 000f94d204
37 changed files with 92 additions and 1462 deletions

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8717701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714FEE2C80A070381A403020
3500404421000002000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D2056330A20202020012B
020317314A049F13223E213D203C0167
030C001000802DEE2C80A070381A4030
203500404421000002011D007251D01E
206E2835000F282100001E0000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
000000000000000000000000000000CD

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8737701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714F023A801871382D40582C
45000F282100001E000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D20563420506C7573012D
020320714B90041F13223E213D203C01
67030C001000802D23097F0783010000
023A801871382D40582C45000F282100
001E011D007251D01E206E2855000F28
2100001E023A80D072382D40102C4580
0F282100001E00000000000000000000
00000000000000000000000000000000
00000000000000000000000000000042

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8707701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714F011D007251D01E206E28
55000F282100001E000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D0A20202020202020018D
020317314A841F13223E213D203C0167
030C001000802D011D007251D01E206E
2855000F282100001E00000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000015

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8707701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714F011D007251D01E206E28
55000F282100001E000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D0A20202020202020018D
020317314A841F13223E213D203C0167
030C001000802D011D007251D01E206E
2855000F282100001E00000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000015

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8707701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714F011D007251D01E206E28
55000F282100001E000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D0A20202020202020018D
020317314A841F13223E213D203C0167
030C001000802D011D007251D01E206E
2855000F282100001E00000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000015

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8717701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714F011D007251D01E206E28
55000F282100001E000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D2056330A202020200143
020317314A841F13223E213D203C0167
030C001000802D011D007251D01E206E
2855000F282100001E00000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000015

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8727701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714F023A801871382D40582C
45000F282100001E000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D205634204D696E690145
020320714B90041F13223E213D203C01
67030C001000802D23097F0783010000
023A801871382D40582C45000F282100
001E011D007251D01E206E2855000F28
2100001E023A80D072382D40102C4580
0F282100001E283C80A070B023403020
360006442100001A0000000000000000
00000000000000000000000000000030

View File

@@ -1,16 +0,0 @@
00FFFFFFFFFFFF0031D8737701010101
231A010380351E780E0565A756529C27
0F50543FED00B300A9C0950090408180
814081C0714F023A801871382D40582C
45000F282100001E000000FF00434146
45424142452020202020000000FD0032
4B0F5211000A202020202020000000FC
0050694B564D20563420506C7573012D
020320714B90041F13223E213D203C01
67030C001000802D23097F0783010000
023A801871382D40582C45000F282100
001E011D007251D01E206E2855000F28
2100001E023A80D072382D40102C4580
0F282100001E283C80A070B023403020
360006442100001A0000000000000000
00000000000000000000000000000030

View File

@@ -1,4 +0,0 @@
[server]
unix = /run/kvmd/fan.sock
unix_rm = 1
unix_mode = 666

View File

@@ -1,12 +0,0 @@
[main]
pwm_pin = 13
hall_pin = 16
[speed]
idle = 27
low = 27
[server]
unix = /run/kvmd/fan.sock
unix_rm = 1
unix_mode = 666

View File

@@ -1,12 +0,0 @@
[main]
pwm_pin = 13
hall_pin = 16
[speed]
idle = 27
low = 27
[server]
unix = /run/kvmd/fan.sock
unix_rm = 1
unix_mode = 666

View File

@@ -1,149 +0,0 @@
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m'
echo -e "${GREEN}One-KVM pre-starting...${NC}"
#仅首次运行,用于初始化配置文件
if [ ! -f /etc/kvmd/.init_flag ]; then
#生成 ssl 证书 和 vnc 证书
/usr/share/kvmd/kvmd-gencert --do-the-thing
/usr/share/kvmd/kvmd-gencert --do-the-thing --vnc
#生成 nginx 配置文件
if [ "$NOSSL" = 1 ]; then
echo -e "${GREEN}One-KVM SSL is disabled.${NC}"
python -m kvmd.apps.ngxmkconf /etc/kvmd/nginx/nginx.conf.mako /etc/kvmd/nginx/nginx.conf -o nginx/https/enabled=false
else
python -m kvmd.apps.ngxmkconf /etc/kvmd/nginx/nginx.conf.mako /etc/kvmd/nginx/nginx.conf
fi
if [ "$NOAUTH" == "1" ]; then
sed -i "s/enabled: true/enabled: false/g" /etc/kvmd/override.yaml
fi
#生成 supervisord 配置文件是否添加扩展服务
if [ "$NOWEBTERM" == "1" ]; then
echo -e "${GREEN}One-KVM webterm is disabled.${NC}"
rm -r /usr/share/kvmd/extras/webterm
else
cat >> /etc/kvmd/supervisord.conf << EOF
[program:kvmd-webterm]
command=/usr/local/bin/ttyd --interface=/run/kvmd/ttyd.sock --port=0 --writable /bin/bash -c '/etc/kvmd/armbain-motd; bash'
directory=/
autostart=true
autorestart=true
priority=14
stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true
EOF
fi
if [ "$NOWEBTERMWRITE" == "1" ]; then
sed -i "s/--writable//g" /etc/kvmd/supervisord.conf
fi
if [ "$NOVNC" == "1" ]; then
echo -e "${GREEN}One-KVM VNC is disabled.${NC}"
rm -r /usr/share/kvmd/extras/vnc
else
cat >> /etc/kvmd/supervisord.conf << EOF
[program:kvmd-vnc]
command=python -m kvmd.apps.vnc --run
directory=/
autostart=true
autorestart=true
priority=11
stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true
EOF
fi
if [ "$NOIPMI" == "1" ]; then
echo -e "${GREEN}One-KVM IPMI is disabled.${NC}"
rm -r /usr/share/kvmd/extras/ipmi
else
cat >> /etc/kvmd/supervisord.conf << EOF
[program:kvmd-ipmi]
command=python -m kvmd.apps.ipmi --run
directory=/
autostart=true
autorestart=true
priority=12
stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true
EOF
fi
#OTG 初始化修改默认配置文件
if [ "$OTG" == "1" ]; then
echo -e "${GREEN}One-KVM OTG is enabled.${NC}"
sed -i "s/ch9329/otg/g" /etc/kvmd/override.yaml
sed -i "s/device: \/dev\/ttyUSB0//g" /etc/kvmd/override.yaml
cat >> /etc/kvmd/supervisord.conf << EOF
[program:kvmd-otg]
command=python -m kvmd.apps.otg start
directory=/
autostart=true
autorestart=unexpected
priority=9
stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true
EOF
fi
#/dev/kvmd-video 设备优先级高于 /dev/video0,/dev/kvmd-hid 设备优先级高于 /dev/ttyUSB0
if [ -f /dev/kvmd-video ]; then
echo -e "${GREEN}Found dev/kvmd-video, use it as kvmd video device.${NC}"
sed -i "s/\/dev\/video0/\/dev\/kvmd-video/g" /etc/kvmd/override.yaml
fi
if [ -f /dev/kvmd-hid ]; then
echo -e "${GREEN}Found /dev/kvmd-hid, use it as kvmd video device.${NC}"
sed -i "s/\/dev\/ttyUSB0/\/dev\/kvmd-hid/g" /etc/kvmd/override.yaml
fi
#设置用户账号密码
if [ ! -z "$USERNAME" ] && [ ! -z "$PASSWORD" ]; then
python -m kvmd.apps.htpasswd del admin
echo $PASSWORD | python -m kvmd.apps.htpasswd set -i "$USERNAME"
echo "$PASSWORD -> $USERNAME:$PASSWORD" > /etc/kvmd/vncpasswd
echo "$USERNAME:$PASSWORD -> $USERNAME:$PASSWORD" > /etc/kvmd/ipmipasswd
else
echo -e "${YELLOW} USERNAME and PASSWORD environment variables is not set, using defalut(admin/admin).${NC}"
fi
#新建 flag 标记文件
touch /etc/kvmd/.init_flag
fi
#尝试挂载 usb_gadget
if [ "$OTG" == "1" ]; then
echo "Trying OTG Port..."
if [ -d /sys/kernel/config/usb_gadget/kvmd ]; then
echo -e "${RED}Usb_gadget kvmd exists, please reboot your host system. ${NC}"
exit -1
elif [ ! -d /sys/kernel/config/usb_gadget ]; then
mount -t configfs none /sys/kernel/config
fi
fi
echo -e "${GREEN}One-KVM starting...${NC}"
exec supervisord -c /etc/kvmd/supervisord.conf

View File

@@ -1,39 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: serial
atx:
type: gpio
msd:
type: disabled
streamer:
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"

View File

@@ -1,47 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: serial
atx:
type: gpio
msd:
type: disabled
streamer:
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"

View File

@@ -1,55 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: serial
atx:
type: gpio
msd:
type: disabled
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"

View File

@@ -1,51 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: serial
atx:
type: gpio
msd:
type: disabled
streamer:
quality: 0
resolution:
default: 1920x1080
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
- 640x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"

View File

@@ -1,59 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: serial
atx:
type: gpio
msd:
type: disabled
streamer:
quality: 0
resolution:
default: 1920x1080
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
- 640x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"

View File

@@ -1,59 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: serial
atx:
type: gpio
msd:
type: disabled
streamer:
quality: 0
resolution:
default: 1920x1080
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
- 640x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"

View File

@@ -1,48 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: spi
chip: 0
bus: 0
sw_cs_pin: 7
sw_cs_per_byte: true
reset_pin: 25
reset_inverted: true
reset_self: true
power_detect_pin: 16
power_detect_pull_down: true
atx:
type: gpio
msd:
type: disabled
streamer:
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"

View File

@@ -1,64 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: spi
chip: 0
bus: 0
sw_cs_pin: 7
sw_cs_per_byte: true
reset_pin: 25
reset_inverted: true
reset_self: true
power_detect_pin: 16
power_detect_pull_down: true
atx:
type: gpio
msd:
type: disabled
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"

View File

@@ -1,64 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: spi
chip: 0
bus: 0
sw_cs_pin: 7
sw_cs_per_byte: true
reset_pin: 25
reset_inverted: true
reset_self: true
power_detect_pin: 16
power_detect_pull_down: true
atx:
type: gpio
msd:
type: disabled
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"

View File

@@ -1,60 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: spi
chip: 0
bus: 0
sw_cs_pin: 7
sw_cs_per_byte: true
reset_pin: 25
reset_inverted: true
reset_self: true
power_detect_pin: 16
power_detect_pull_down: true
atx:
type: gpio
msd:
type: disabled
streamer:
quality: 0
resolution:
default: 1920x1080
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
- 640x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"

View File

@@ -1,68 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: spi
chip: 0
bus: 0
sw_cs_pin: 7
sw_cs_per_byte: true
reset_pin: 25
reset_inverted: true
reset_self: true
power_detect_pin: 16
power_detect_pull_down: true
atx:
type: gpio
msd:
type: disabled
streamer:
quality: 0
resolution:
default: 1920x1080
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
- 640x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"

View File

@@ -1,68 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: spi
chip: 0
bus: 0
sw_cs_pin: 7
sw_cs_per_byte: true
reset_pin: 25
reset_inverted: true
reset_self: true
power_detect_pin: 16
power_detect_pull_down: true
atx:
type: gpio
msd:
type: disabled
streamer:
quality: 0
resolution:
default: 1920x1080
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
- 640x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"

View File

@@ -1,55 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: otg
atx:
type: gpio
msd:
type: otg
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"

View File

@@ -1,56 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: otg
atx:
type: gpio
msd:
type: otg
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--buffers=6"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"

View File

@@ -1,55 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: otg
atx:
type: gpio
msd:
type: otg
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"

View File

@@ -1,59 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: otg
atx:
type: disabled
msd:
type: otg
streamer:
quality: 0
resolution:
default: 1920x1080
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
- 640x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"

View File

@@ -1,68 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
info:
fan:
unix: /run/kvmd/fan.sock
hid:
type: otg
atx:
type: gpio
msd:
type: otg
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--buffers=6"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
gpio:
scheme:
__v3_usb_breaker__:
pin: 5
mode: output
initial: true
pulse: false
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"

View File

@@ -1,97 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
info:
hw:
ignore_past: true
fan:
unix: /run/kvmd/fan.sock
hid:
type: otg
mouse_alt:
device: /dev/kvmd-hid-mouse-alt
atx:
type: gpio
power_led_pin: 4
hdd_led_pin: 5
power_switch_pin: 23
reset_switch_pin: 27
msd:
type: otg
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--buffers=6"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
gpio:
drivers:
__v4_locator__:
type: locator
scheme:
__v3_usb_breaker__:
pin: 22
mode: output
initial: true
pulse: false
__v4_locator__:
driver: __v4_locator__
pin: 12
mode: output
pulse: false
__v4_const1__:
pin: 6
mode: output
initial: false
switch: false
pulse: false
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"
otg:
remote_wakeup: true

View File

@@ -1,98 +0,0 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
info:
hw:
ignore_past: true
fan:
unix: /run/kvmd/fan.sock
hid:
type: otg
mouse_alt:
device: /dev/kvmd-hid-mouse-alt
atx:
type: gpio
power_led_pin: 4
hdd_led_pin: 5
power_switch_pin: 23
reset_switch_pin: 27
msd:
type: otg
streamer:
h264_bitrate:
default: 5000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--dv-timings"
- "--format=uyvy"
- "--format-swap-rgb"
- "--buffers=8"
- "--encoder=m2m-image"
- "--workers=3"
- "--quality={quality}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
gpio:
drivers:
__v4_locator__:
type: locator
scheme:
__v3_usb_breaker__:
pin: 22
mode: output
initial: true
pulse: false
__v4_locator__:
driver: __v4_locator__
pin: 12
mode: output
pulse: false
__v4_const1__:
pin: 6
mode: output
initial: false
switch: false
pulse: false
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"
otg:
remote_wakeup: true

View File

@@ -1,39 +1,78 @@
###############################################################################
# #
# Override KVMD settings. #
# #
# * https://docs.pikvm.org/first_steps/#structure-of-configuration-files #
# #
# This file uses YAML syntax. All overridden parameters will be applied #
# AFTER other configs and "!include" directives, and BEFORE validation. #
# Values should be combined under common sections. #
# #
###############################################################################
#
#########
# Wrong #
#########
#kvmd:
# gpio:
# drivers: ...
#kvmd:
# gpio:
# scheme: ...
#
###########
# Correct #
###########
#kvmd:
# gpio:
# drivers: ...
# scheme: ...
#
###########
# Example #
###########
#vnc:
# # See https://docs.pikvm.org/vnc
# keymap: /usr/share/kvmd/keymaps/ru # Set russian keymap
# auth:
# vncauth:
# enabled: true # Enable auth via /etc/kvmd/vncpasswd
kvmd:
auth:
enabled: true
server:
unix_mode: 0666
atx:
type: disabled
hid:
type: ch9329
device: /dev/ttyUSB0
msd:
type: disabled
streamer:
resolution:
default: 1280x720
forever: true
h264_bitrate:
default: 2000
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/video0"
- "--persistent"
- "--format=mjpeg"
- "--encoder=LIBX264-VIDEO"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--last-as-blank=0"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0666"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--h264-sink=kvmd::ustreamer::h264"
- "--h264-sink-mode=0660"
- "--jpeg-sink=kvmd::ustreamer::jpeg"
- "--jpeg-sink-mode=0660"
- "--h264-bitrate={h264_bitrate}"
- "--h264-gop={h264_gop}"
- "--slowdown"
vnc:
keymap: /usr/share/kvmd/keymaps/ru
auth:
vncauth:
enabled: true
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"
otgnet:
commands:
post_start_cmd:
- "/bin/true"
pre_stop_cmd:
- "/bin/true"
nginx:
http:
port: 8080
https:
port: 4430
languages:
console: zh
web: zh