Only delete old service databases after a *successful* update

This commit is contained in:
genofire 2020-10-24 05:25:49 +02:00
parent e8ad17c054
commit 593d8deddf
1 changed files with 3 additions and 3 deletions

View File

@ -89,10 +89,10 @@ s6_rc_reload()
if s6-rc-update -v 2 -t $update_timeout "/etc/s6-rc/.compiled.$uuid"; then
ln -shf ".compiled.$uuid" compiled
echo "Updated s6-rc service database."
fi
echo "Deleting old service databases."
find -s . -mindepth 1 -maxdepth 1 -type d -name '.compiled.*' -not -name ".compiled.$uuid" -print0 | xargs -0 rm -r
echo "Deleting old service databases."
find -s . -mindepth 1 -maxdepth 1 -type d -name '.compiled.*' -not -name ".compiled.$uuid" -print0 | xargs -0 rm -r
fi
}
s6_rc_status()