More fixes for update

This commit is contained in:
2026-10-19 14:01:00 -06:00
parent a65f07c22e
commit f10463b89c
5 changed files with 37 additions and 10 deletions
+7
View File
@@ -72,3 +72,10 @@ enable_services() {
fi
done
}
# Install a script atomically (copy to a temp file, then rename over the target)
# so a copy of it that is running right now keeps reading the old file
install_script() {
local tmp
tmp="$(mktemp "$2.XXXXXX")" && cp "$1" "$tmp" && chmod 755 "$tmp" && mv -f "$tmp" "$2"
}