source: trunk/packages/invirt-remote/host/usr/sbin/invirt-remote @ 2104

Last change on this file since 2104 was 2104, checked in by iannucci, 15 years ago

Added remote web availability remctl and script to calculate memory available to new VMs

  • Property svn:executable set to *
File size: 980 bytes
RevLine 
[657]1#!/bin/sh
[1239]2# invirt-remote TYPE SERVICE [ARGS...]
[657]3#
4# We carry out the remctl command proxied to us by the remote-control server.
5
6TYPE="$1"
7SERVICE="$2"
8shift; shift;
9
10case "$TYPE" in
11    control)
12        # $SERVICE is hostname
[1239]13        COMMAND=/usr/sbin/invirt-vmcontrol
[657]14        ;;
15    web)
16        case "$SERVICE" in
17            lvcreate|lvremove|lvrename|lvresize)
[1239]18                COMMAND=/usr/sbin/invirt-lvm
[657]19                ;;
20            listvms)
[1239]21                COMMAND=/usr/sbin/invirt-listvms
[657]22                ;;
[2104]23                info)
24                COMMAND=/usr/sbin/xm
25            ;;
26            availability)
27                COMMAND=/usr/sbin/invirt-availability
28            ;;
[1401]29            vnccert)
30                COMMAND=/usr/bin/invirt-vnc-getcert
31                ;;
[657]32            *)
33                echo "ERROR: invalid subcommand"
[1164]34                exit 34
[657]35                ;;
36        esac
37        ;;
38    *)
39        echo "ERROR: invalid command"
[1164]40        exit 34
[657]41        ;;
42esac
43
[2097]44$COMMAND "$SERVICE" "$@"
Note: See TracBrowser for help on using the repository browser.