gluon-autoupdater: unconditionally perform an update 5 minutes after boot when the whole PRIORITY delay has passed
This commit is contained in:
parent
a39f527dad
commit
35d8ff579f
18
package/gluon-autoupdater/files/etc/init.d/gluon-autoupdater
Executable file
18
package/gluon-autoupdater/files/etc/init.d/gluon-autoupdater
Executable file
@ -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
|
||||
}
|
5
package/gluon-autoupdater/files/lib/gluon/autoupdater/delayed_update
Executable file
5
package/gluon-autoupdater/files/lib/gluon/autoupdater/delayed_update
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# wait for 5 minutes after boot
|
||||
sleep 300
|
||||
exec /lib/gluon/autoupdater/autoupdate -o
|
Loading…
Reference in New Issue
Block a user