From 35d8ff579f4a21329ae4e781652322399aa6b992 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer <mschiffer@universe-factory.net> Date: Mon, 21 Jul 2014 17:12:29 +0200 Subject: [PATCH] gluon-autoupdater: unconditionally perform an update 5 minutes after boot when the whole PRIORITY delay has passed --- .../files/etc/init.d/gluon-autoupdater | 18 ++++++++++++++++++ .../files/lib/gluon/autoupdater/delayed_update | 5 +++++ 2 files changed, 23 insertions(+) create mode 100755 package/gluon-autoupdater/files/etc/init.d/gluon-autoupdater create mode 100755 package/gluon-autoupdater/files/lib/gluon/autoupdater/delayed_update diff --git a/package/gluon-autoupdater/files/etc/init.d/gluon-autoupdater b/package/gluon-autoupdater/files/etc/init.d/gluon-autoupdater new file mode 100755 index 000000000..45a1ef62e --- /dev/null +++ b/package/gluon-autoupdater/files/etc/init.d/gluon-autoupdater @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common + +START=99 + +SERVICE_NAME=gluon-autoupdater +SERVICE_WRITE_PID=1 +SERVICE_DAEMONIZE=1 + + +start() { + [ "$(uci get autoupdater.settings.enabled)" = 1 ] || return + + service_start /bin/sh /lib/gluon/autoupdater/delayed_update +} + +stop() { + service_stop /bin/sh +} diff --git a/package/gluon-autoupdater/files/lib/gluon/autoupdater/delayed_update b/package/gluon-autoupdater/files/lib/gluon/autoupdater/delayed_update new file mode 100755 index 000000000..95841f867 --- /dev/null +++ b/package/gluon-autoupdater/files/lib/gluon/autoupdater/delayed_update @@ -0,0 +1,5 @@ +#!/bin/sh + +# wait for 5 minutes after boot +sleep 300 +exec /lib/gluon/autoupdater/autoupdate -o -- GitLab