diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:56:41 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:56:41 +0100 |
commit | d87262dd706fec50cd150aab3e93883b6337466d (patch) | |
tree | 246b44c33ad7a57550430b0a60fa0df86a3c9e68 /app-emulation/phpvirtualbox/files/vboxinit-initd | |
parent | 71bc00c87bba1ce31de0dac6c3b7fd1aee6917fc (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/phpvirtualbox/files/vboxinit-initd')
-rw-r--r-- | app-emulation/phpvirtualbox/files/vboxinit-initd | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/app-emulation/phpvirtualbox/files/vboxinit-initd b/app-emulation/phpvirtualbox/files/vboxinit-initd deleted file mode 100644 index 891137a2d267..000000000000 --- a/app-emulation/phpvirtualbox/files/vboxinit-initd +++ /dev/null @@ -1,39 +0,0 @@ -#!/sbin/openrc-run - -description="Controls VirtualBox sessions" - -. /etc/conf.d/vboxwebsrv - -su_command="su - ${VBOXWEBSRV_USER} -c" - -depend() { - need localmount - after bootmisc -} - -start() { - einfo "Starting VirtualBox machines" - eindent - MACHINES=$($su_command "VBoxManage list vms | awk '{ print \$NF }' | sed -e 's/[{}]//g'") - for UUID in $MACHINES; do - STARTUP=$($su_command "VBoxManage getextradata $UUID 'pvbx/startupMode'" | awk '{ print $NF }') - VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'") - if [ "${STARTUP}" == "auto" ]; then - ebegin "Starting machine ${VMNAME}" - $su_command "VBoxManage startvm $UUID --type headless" &>> /var/log/vboxinit.log - eend $? - fi - done -} - -stop() { - einfo "Saving VirtualBox machines" - eindent - MACHINES=$($su_command "VBoxManage list runningvms | awk '{ print \$NF }' | sed -e 's/[{}]//g'") - for UUID in $MACHINES; do - VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'") - ebegin "Stopping machine ${VMNAME}" - $su_command "VBoxManage controlvm $UUID savestate" &>> /var/log/vboxinit.log - eend $? - done -} |