#!/bin/bash

workpath="$1"
containerid="$2"
crundir="$3"
cmd="$4"

vm_uuid=$( cat "$crundir"/xcp_vm_uuid )

case "$cmd" in
pause)
    xe vm-pause uuid="$vm_uuid"
    ;;
resume)
    xe vm-unpause uuid="$vm_uuid"
    ;;
*)
    echo "pause/resume command not found"
    exit 1
    ;;
esac

exit $?
