source: trunk/packages/invirt-console/files/usr/sbin/invirt-console-update @ 1813

Last change on this file since 1813 was 1813, checked in by broder, 15 years ago

Rename invirt-console-server source package to invirt-console

  • Property svn:executable set to *
File size: 429 bytes
Line 
1#!/usr/bin/python
2import sys
3import os
4import subprocess
5
6def main(args):
7  contents = args[2]
8  hostname = os.environ['REMOTE_HOST'].lower()
9  f = file('/etc/conserver/conf.d/'+hostname, 'w')
10  f.write(contents)
11  f.close()
12  p = subprocess.Popen(['/usr/sbin/invoke-rc.d', 'conserver-server', 'reload'],
13                       stdout=subprocess.PIPE)
14  p.wait()
15  return 0
16
17if __name__ == '__main__':
18  sys.exit(main(sys.argv))
Note: See TracBrowser for help on using the repository browser.