autoupdater: stop non-essential services before downloading the image
This commit is contained in:
parent
b4aaf8a1f8
commit
0005b3b5a2
6
package/gluon-alfred/files/usr/lib/autoupdater/abort.d/60gluon-alfred
Executable file
6
package/gluon-alfred/files/usr/lib/autoupdater/abort.d/60gluon-alfred
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
start_enabled alfred
|
6
package/gluon-alfred/files/usr/lib/autoupdater/download.d/40gluon-alfred
Executable file
6
package/gluon-alfred/files/usr/lib/autoupdater/download.d/40gluon-alfred
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
stop alfred
|
16
package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
Normal file
16
package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh
Normal 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
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
start_enabled cron
|
||||
start_enabled haveged
|
||||
start_enabled micrond
|
||||
start_enabled sysntpd
|
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
stop cron
|
||||
stop haveged
|
||||
stop micrond
|
||||
stop sysntpd
|
6
package/gluon-radvd/files/usr/lib/autoupdater/abort.d/80gluon-radvd
Executable file
6
package/gluon-radvd/files/usr/lib/autoupdater/abort.d/80gluon-radvd
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
start_enabled gluon-radvd
|
6
package/gluon-radvd/files/usr/lib/autoupdater/download.d/20gluon-radvd
Executable file
6
package/gluon-radvd/files/usr/lib/autoupdater/download.d/20gluon-radvd
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
stop gluon-radvd
|
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
start_enabled batman-adv-visdata
|
||||
start_enabled gluon-respondd
|
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
stop gluon-respondd
|
||||
stop batman-adv-visdata
|
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
start_enabled sse-multiplexd
|
||||
start_enabled uhttpd
|
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
stop uhttpd
|
||||
stop sse-multiplexd
|
Loading…
Reference in New Issue
Block a user