19 lines
562 B
Bash
19 lines
562 B
Bash
#!/bin/bash
|
|
|
|
OBJECT="$1"
|
|
OPERATION="$2"
|
|
|
|
if [[ $OBJECT == "win10" ]]; then
|
|
case "$OPERATION" in
|
|
"prepare")
|
|
systemctl start libvirt-nosleep@"$OBJECT" 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
|
/bin/start.sh 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
|
;;
|
|
|
|
"release")
|
|
systemctl stop libvirt-nosleep@"$OBJECT" 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
|
/bin/stop.sh 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
|
;;
|
|
esac
|
|
fi
|