autoupdater: stop non-essential services before downloading the image

This commit is contained in:
Matthias Schiffer 2016-02-02 06:38:03 +01:00
parent b4aaf8a1f8
commit 0005b3b5a2
11 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
start_enabled alfred

View File

@ -0,0 +1,6 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
stop alfred

View File

@ -0,0 +1,16 @@
# Library to be sourced by download.d/abort.d scripts
stop() {
if [ -x /etc/init.d/$1 ]; then
echo "Stopping $1..."
/etc/init.d/$1 stop
fi
}
start_enabled() {
if [ -x /etc/init.d/$1 ] && /etc/init.d/$1 enabled; then
echo "Starting $1..."
/etc/init.d/$1 start
fi
}

View File

@ -0,0 +1,9 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
start_enabled cron
start_enabled haveged
start_enabled micrond
start_enabled sysntpd

View File

@ -0,0 +1,9 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
stop cron
stop haveged
stop micrond
stop sysntpd

View File

@ -0,0 +1,6 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
start_enabled gluon-radvd

View File

@ -0,0 +1,6 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
stop gluon-radvd

View File

@ -0,0 +1,7 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
start_enabled batman-adv-visdata
start_enabled gluon-respondd

View File

@ -0,0 +1,7 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
stop gluon-respondd
stop batman-adv-visdata

View File

@ -0,0 +1,7 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
start_enabled sse-multiplexd
start_enabled uhttpd

View File

@ -0,0 +1,7 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
stop uhttpd
stop sse-multiplexd