If 'wwwdir' is changed to '/usr/share/swupdate/www' for example,
the service configuration does not adapt and shows an empty page
---
Signed-off-by: Adrian DC <
radi...@gmail.com>
---
recipes-support/swupdate/swupdate.inc | 6 ++++--
recipes-support/swupdate/swupdate/10-mongoose-args | 1 -
recipes-support/swupdate/swupdate/
10-mongoose-args.in | 1 +
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 recipes-support/swupdate/swupdate/10-mongoose-args
create mode 100644 recipes-support/swupdate/swupdate/
10-mongoose-args.in
diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
index cb39134..6909ad3 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -38,7 +38,7 @@ SRC_URI = "git://
github.com/sbabic/swupdate.git;protocol=https;branch=${SRCBRANC
file://swupdate-usb@.service \
file://swupdate-progress.service \
file://tmpfiles-swupdate.conf \
- file://10-mongoose-args \
+ file://
10-mongoose-args.in \
file://90-start-progress \
"
@@ -295,7 +295,9 @@ do_install () {
install -m 755 ${WORKDIR}/swupdate.sh ${D}${libdir}/swupdate
sed -i 's#@LIBDIR@#${libdir}#g' ${D}${libdir}/swupdate/swupdate.sh
if ${SWUPDATE_MONGOOSE}; then
- install -m 644 ${WORKDIR}/10-mongoose-args ${D}${libdir}/swupdate/conf.d/
+ install -m 644 ${WORKDIR}/
10-mongoose-args.in ${D}${libdir}/swupdate/conf.d/10-mongoose-args
+ sed -e "s#@@wwwdir@@#${wwwdir}#g" \
+ -i ${D}${libdir}/swupdate/conf.d/10-mongoose-args
fi
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/swupdate.service ${D}${systemd_system_unitdir}
diff --git a/recipes-support/swupdate/swupdate/10-mongoose-args b/recipes-support/swupdate/swupdate/10-mongoose-args
deleted file mode 100644
index 896e66b..0000000
--- a/recipes-support/swupdate/swupdate/10-mongoose-args
+++ /dev/null
@@ -1 +0,0 @@
-SWUPDATE_WEBSERVER_ARGS="-r /www ${SWUPDATE_MONGOOSE_EXTRA_ARGS:--p 8080}"
diff --git a/recipes-support/swupdate/swupdate/
10-mongoose-args.in b/recipes-support/swupdate/swupdate/
10-mongoose-args.in
new file mode 100644
index 0000000..a2ca1a6
--- /dev/null
+++ b/recipes-support/swupdate/swupdate/
10-mongoose-args.in
@@ -0,0 +1 @@
+SWUPDATE_WEBSERVER_ARGS="-r @@wwwdir@@ ${SWUPDATE_MONGOOSE_EXTRA_ARGS:--p 8080}"
--
2.43.0