source: trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-vnccert @ 2508

Last change on this file since 2508 was 1822, checked in by broder, 16 years ago

Merge invirt-remote-host and invirt-remote-server into invirt-remote

  • Property svn:executable set to *
File size: 585 bytes
RevLine 
[1411]1#!/usr/bin/python
[1402]2
[1411]3"""
4Retrieves the VNC certificate from an Invirt host
5"""
[1402]6
[1411]7from invirt.config import structs as config
8from subprocess import Popen, call, PIPE
9import sys
10
11
12def main(argv):
13    if len(argv) < 2:
14        print >> sys.stderr, "usage: invirt-remote-vnccert <host>"
15        return 2
16   
17    host = argv[1]
18   
19    if host not in list(i.hostname for i in config.hosts):
20        print >> sys.stderr, "Invalid hostname specified"
21        return 1
22   
23    return call(['remctl', host, 'remote', 'web', 'vnccert'])
24
25if __name__ == '__main__':
26    sys.exit(main(sys.argv))
Note: See TracBrowser for help on using the repository browser.