Last change
on this file since 1491 was
1446,
checked in by broder, 16 years ago
|
Use invoke-rc.d instead of calling init scripts directly in
invirt-console-server init script and invirt-console-update
|
-
Property svn:executable set to
*
|
File size:
419 bytes
|
Rev | Line | |
---|
[672] | 1 | #!/usr/bin/python |
---|
| 2 | import sys |
---|
| 3 | import os |
---|
| 4 | import subprocess |
---|
| 5 | |
---|
| 6 | def 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() |
---|
[1446] | 12 | p = subprocess.Popen(['invoke-rc.d', 'conserver-server', 'reload'], |
---|
[672] | 13 | stdout=subprocess.PIPE) |
---|
| 14 | p.wait() |
---|
| 15 | return 0 |
---|
| 16 | |
---|
| 17 | if __name__ == '__main__': |
---|
| 18 | sys.exit(main(sys.argv)) |
---|
Note: See
TracBrowser
for help on using the repository browser.