From 2bd732830f79849e79d142491d881d8f043eebc7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 26 Jun 2019 22:19:07 +0200 Subject: [PATCH] yweb: fix osmod webif port Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/67e97fecd7dfc4c5d19cff60d43c12285b171f1f Author: vanhofen Date: 2019-06-26 (Wed, 26 Jun 2019) Origin message was: ------------------ - yweb: fix osmod webif port --- data/y-web/Y_NI_Camd-control.yhtm | 3 ++- data/y-web/scripts/Y_NI_Tools.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/data/y-web/Y_NI_Camd-control.yhtm b/data/y-web/Y_NI_Camd-control.yhtm index 6f482b38a..6fe6bd47f 100644 --- a/data/y-web/Y_NI_Camd-control.yhtm +++ b/data/y-web/Y_NI_Camd-control.yhtm @@ -15,6 +15,7 @@ {=var-set:r_mgcamd={=script:Y_NI_Tools is_running mgcamd=}=} {=var-set:oscamport={=script:Y_NI_Tools get_oscam_webif_port=}=} +{=var-set:osmodport={=script:Y_NI_Tools get_osmod_webif_port=}=} {=var-set:ncamport={=script:Y_NI_Tools get_ncam_webif_port=}=} {=var-set:cccamport={=script:Y_NI_Tools get_cccam_webif_port=}=} {=var-set:doscamport={=script:Y_NI_Tools get_doscam_webif_port=}=} @@ -220,7 +221,7 @@ input[type="button"], .tools select { {=if-equal:{=var-get:r_{=var-get:camd=}=}~true~ - {=var-get:camd=} + {=var-get:camd=} ~ {=var-get:camd=} =} diff --git a/data/y-web/scripts/Y_NI_Tools.sh b/data/y-web/scripts/Y_NI_Tools.sh index 07bbd3cb2..896dd00ab 100644 --- a/data/y-web/scripts/Y_NI_Tools.sh +++ b/data/y-web/scripts/Y_NI_Tools.sh @@ -301,6 +301,14 @@ case "$action" in printf "%s" ${_port:-8080} ;; + get_osmod_webif_port) + if [ -e %(CONFIGDIR)/oscam.conf ]; then + _port=$(grep -m 1 -i "^[:space:]*httpport" %(CONFIGDIR)/oscam.conf | cut -d'=' -f2) + _port=$(echo $_port | dos2unix -u) + fi + printf "%s" ${_port:-8888} + ;; + get_ncam_webif_port) if [ -e %(CONFIGDIR)/ncam.conf ]; then _port=$(grep -m 1 -i "^[:space:]*httpport" %(CONFIGDIR)/ncam.conf | cut -d'=' -f2)