forked from freifunk-franken/firmware
fff-web: Added options to disable update notification
Update notification is enabled by default. If required, this allows disabling it permanently. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
parent
84432f7bbf
commit
a4c9978f5a
|
@ -1,7 +1,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fff-web
|
||||
PKG_VERSION:=5
|
||||
PKG_VERSION:=6
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# This disables the WebUI update notification permanently
|
||||
# (preserved during firmware upgrade)
|
||||
|
||||
uci -q set "fff.notifyupdate=webui"
|
||||
uci -q set "fff.notifyupdate.value=0"
|
||||
|
||||
uci -q commit fff
|
||||
|
||||
/bin/rm -f /tmp/isupdate
|
||||
/bin/rm -f /tmp/fwcheck
|
|
@ -17,7 +17,7 @@ hood="$(uci -q get "system.@system[0].hood")"
|
|||
|
||||
NOW=$(date +%s)
|
||||
#Check if new Firmware check older then 1 day
|
||||
if [ ! -s /tmp/fwcheck ] || [ "$(cat /tmp/fwcheck)" -lt "$NOW" ] ; then
|
||||
if ( [ ! -s /tmp/fwcheck ] || [ "$(cat /tmp/fwcheck)" -lt "$NOW" ] ) && [ ! "$(uci -q get fff.notifyupdate.value)" = "0" ] ; then
|
||||
rm -f /tmp/isupdate
|
||||
NEXTUPDATE=$(($(date +%s)+86400))
|
||||
echo $NEXTUPDATE > /tmp/fwcheck
|
||||
|
|
Loading…
Reference in New Issue