Systemd no sleep

This commit is contained in:
Ansh Srivastava
2020-10-13 02:07:46 +00:00
committed by Risingprism
parent c3d42f3a01
commit 432715a83c
8 changed files with 54 additions and 29 deletions
Executable
+20
View File
@@ -0,0 +1,20 @@
#!/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/vfio-startup.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/vfio-teardown.sh 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
;;
esac
fi