Detach update commands from process

This commit is contained in:
pvizeli 2017-03-30 09:31:06 +02:00
parent 4f9973c193
commit 5a642cafa4
2 changed files with 5 additions and 4 deletions

View File

@ -16,6 +16,7 @@ SYSTEMD_AUTO_ENABLE = "enable"
RDEPENDS_${PN} = " \ RDEPENDS_${PN} = " \
bash \ bash \
socat \ socat \
nohup \
" "
FILES_${PN} += " \ FILES_${PN} += " \

View File

@ -32,18 +32,18 @@ do
fi fi
if [ ${parse[0]} == "host-update" ]; then if [ ${parse[0]} == "host-update" ]; then
if [ ! -z ${parse[1]} ]; then if [ ! -z ${parse[1]} ]; then
resinhub --hostos-version ${parse[1]} || true nohup resinhub --hostos-version ${parse[1]} > /dev/null 2>&1 &
else else
resinhub || true nohup resinhub > /dev/null 2>&1 &
fi fi
echo "OK" echo "OK"
continue continue
fi fi
if [ ${parse[0]} == "supervisor-update" ]; then if [ ${parse[0]} == "supervisor-update" ]; then
if [ ! -z ${parse[1]} ]; then if [ ! -z ${parse[1]} ]; then
update-resin-supervisor --supervisor-tag ${parse[1]} || true nohup update-resin-supervisor --supervisor-tag ${parse[1]} > /dev/null 2>&1 &
else else
update-resin-supervisor || true nohup update-resin-supervisor > /dev/null 2>&1 &
fi fi
echo "OK" echo "OK"
continue continue