mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-14 00:01:26 +00:00
Show container web interface layout also as u-OS app.
This commit is contained in:
@@ -31,9 +31,22 @@ fi
|
||||
if [[ -z "${IS_U_OS_APP}" ]]; then
|
||||
info "Detected generic container"
|
||||
cp -f /var/www/nginx.conf.generic /etc/nginx/http.d/web.conf
|
||||
|
||||
# Activate script-server
|
||||
sed -i 's/---SED_REPLACEMENT_TAG---/"script-server\/"/g' /var/www/index.html
|
||||
else
|
||||
info "Detected u-OS app"
|
||||
cp -f /var/www/nginx.conf.u-os-app /etc/nginx/http.d/web.conf
|
||||
|
||||
# Generate page for meta information
|
||||
echo "* Content of /var/vm/openwrt_metadata.conf *" > /var/www/system_info.txt
|
||||
cat /var/vm/openwrt_metadata.conf >> /var/www/system_info.txt
|
||||
echo $'\n' >> /var/www/system_info.txt
|
||||
|
||||
echo "* Enviroment variables *" >> /var/www/system_info.txt
|
||||
export >> /var/www/system_info.txt
|
||||
|
||||
sed -i 's/---SED_REPLACEMENT_TAG---/"system_info.txt"/g' /var/www/index.html
|
||||
fi
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="item2">
|
||||
<iframe src="script-server/" width="95%"></iframe>
|
||||
<iframe src=---SED_REPLACEMENT_TAG--- width="95%"></iframe>
|
||||
</div>
|
||||
<div class="item3">
|
||||
<iframe src="novnc/" width="100%"></iframe>
|
||||
|
||||
@@ -26,14 +26,17 @@ server {
|
||||
add_header Cache-Control "no-cache";
|
||||
|
||||
location / {
|
||||
root /var/www;
|
||||
}
|
||||
|
||||
root /usr/share/novnc;
|
||||
location /novnc {
|
||||
index vnc.html;
|
||||
alias /usr/share/novnc;
|
||||
try_files $uri $uri/ /vnc.html;
|
||||
|
||||
if ($request_uri = "/") {
|
||||
return 301 ?resize=scale&reconnect_delay=2000&autoconnect=true&path=u-os-app-openwrt/websockify;
|
||||
if ($request_uri = "/novnc/") {
|
||||
return 301 ?resize=scale&autoconnect=true&reconnect_delay=2000&reconnect=true&path=u-os-app-openwrt/websockify;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
location /websockify {
|
||||
|
||||
Reference in New Issue
Block a user