More fixes for update
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user