OS: move service scripts into libexec

This commit is contained in:
Pascal Vizeli
2018-11-29 16:01:16 +00:00
parent bc3cc20629
commit ae0a2fe264
12 changed files with 8 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/sh
set -e
function mark_good() {
rauc status mark-good
exit 0
}
function mark_bad() {
rauc status mark-bad
systemctl reboot
}
#### Check system ####
# Docker state
if systemctl -q is-failed docker; then
mark_bad
fi
# Docker state
if systemctl -q is-failed hassos-supervisor; then
mark_bad
fi
mark_good