Add Niko server as an alternative to noVNC
This commit is contained in:
18
overlay/etc/cont-init.d/70-configure_neko.sh
Normal file
18
overlay/etc/cont-init.d/70-configure_neko.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
echo "**** Configure Neko ****"
|
||||
|
||||
|
||||
if ([ ${WEB_UI_MODE} = "neko" ] && [ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then
|
||||
echo "Enable Neko server"
|
||||
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/neko.ini
|
||||
if [[ -z ${NEKO_NAT1TO1} ]]; then
|
||||
export NEKO_NAT1TO1=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||
echo "Setting NEKO_NAT1TO1=${NEKO_NAT1TO1}"
|
||||
else
|
||||
echo "User provided setting NEKO_NAT1TO1=${NEKO_NAT1TO1}"
|
||||
fi
|
||||
else
|
||||
echo "Disable Neko server"
|
||||
fi
|
||||
|
||||
echo "DONE"
|
||||
@@ -2,10 +2,8 @@
|
||||
echo "**** Configure VNC ****"
|
||||
|
||||
if ([ ${WEB_UI_MODE} = "vnc" ] && [ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then
|
||||
|
||||
echo "Enable VNC server"
|
||||
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/vnc.ini
|
||||
|
||||
if [[ "${ENABLE_VNC_AUDIO}" == "true" ]]; then
|
||||
# Credits for this audio patch:
|
||||
# - https://github.com/novnc/noVNC/issues/302
|
||||
@@ -34,7 +32,8 @@ if ([ ${WEB_UI_MODE} = "vnc" ] && [ "${MODE}" != "s" ] && [ "${MODE}" != "second
|
||||
# Disable supervisord script
|
||||
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/vnc-audio.ini
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Disable VNC server"
|
||||
fi
|
||||
|
||||
echo "DONE"
|
||||
|
||||
16
overlay/etc/supervisor.d/neko.ini
Normal file
16
overlay/etc/supervisor.d/neko.ini
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
[program:neko]
|
||||
autostart=false
|
||||
autorestart=true
|
||||
priority=30
|
||||
user=%(ENV_USER)s
|
||||
command=/usr/bin/neko serve --static "/var/www" --display %(ENV_DISPLAY)s --bind :%(ENV_PORT_NOVNC_WEB)s
|
||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
|
||||
stopsignal=INT
|
||||
stopwaitsecs=5
|
||||
stdout_logfile=/home/%(ENV_USER)s/.cache/log/neko.log
|
||||
stdout_logfile_maxbytes=10MB
|
||||
stdout_logfile_backups=7
|
||||
stderr_logfile=/home/%(ENV_USER)s/.cache/log/neko.err.log
|
||||
stderr_logfile_maxbytes=10MB
|
||||
stderr_logfile_backups=7
|
||||
Reference in New Issue
Block a user