Refactor to split client from server
This commit is contained in:
+1
-5
@@ -179,11 +179,7 @@ wait_for_vm() {
|
||||
deploy() {
|
||||
local bundle; bundle="$(build_bundle)"
|
||||
log "deploying bundle to $VM_NAME:$SERVER_DIR ..."
|
||||
# Stop first: overwriting a running binary fails with ETXTBSY ("text file busy").
|
||||
if incus exec "$VM_NAME" -- systemctl is-active --quiet "$UNIT_NAME" 2>/dev/null; then
|
||||
log "stopping $UNIT_NAME (binary in use)..."
|
||||
incus exec "$VM_NAME" -- systemctl stop "$UNIT_NAME"
|
||||
fi
|
||||
incus exec "$VM_NAME" -- systemctl stop "$UNIT_NAME" 2>/dev/null || true
|
||||
incus exec "$VM_NAME" -- mkdir -p "$SERVER_DIR/lib" "$LOG_DIR"
|
||||
incus file push "$bundle/server" "$VM_NAME$SERVER_DIR/server" --mode=0755
|
||||
# Ship the bundled libs one by one (robust across incus file-push versions).
|
||||
|
||||
Reference in New Issue
Block a user