36 lines
766 B
Bash
36 lines
766 B
Bash
#!/bin/bash
|
|
|
|
dirn=$(dirname "$0")
|
|
source $dirn/common.sh
|
|
source $dirn/virt.sh
|
|
source $dirn/nginx.sh
|
|
|
|
# this file exists to provide logic that requires functionality from one or
|
|
# more modules in the rest of the code. It can be sourced directly.
|
|
|
|
function vsh() {
|
|
if ! turn_on_vm_and_wait $1; then
|
|
exit 1
|
|
fi
|
|
|
|
sshpass -p $PASSP \
|
|
ssh -o PreferredAuthentications=password \
|
|
-o StrictHostKeyChecking=no \
|
|
$USERN@$(get_vm_ip $1) \
|
|
"cat > /tmp/u.sh <<EOF
|
|
$(typeset WHT)
|
|
$(typeset END)
|
|
$(typeset -f log)
|
|
$(typeset -f num_jobs)
|
|
$(typeset -f build_nginx)
|
|
$(typeset -f build_otel)
|
|
$(typeset -f test_nginx)
|
|
$(typeset -f test_otel)
|
|
$(typeset -f clean_nginx)
|
|
$(typeset -f clean_otel)
|
|
EOF
|
|
bash"
|
|
|
|
|
|
turn_off_vm $1
|
|
}
|