14 lines
297 B
Python
Executable file
14 lines
297 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
import os, sys, subprocess
|
|
|
|
os.environ['VBOX_USER_HOME'] = '/srv/vbox'
|
|
|
|
if not os.path.exists('/var/run/vbox'):
|
|
sys.exit(0)
|
|
|
|
devnull = open('/dev/null', 'wb')
|
|
|
|
for name in os.listdir('/var/run/vbox'):
|
|
subprocess.Popen(['/usr/local/sbin/stopvm', name], env=os.environ).wait()
|
|
|