Tags:
create new tag
view all tags

Executing local commands when clicking on icons in the status page

A new, experimental feature ....

Clicking on some of the icons in the status page or index page of the server will now attempt to download a document of type application/lcfg. The contents of the downloaded document decribe the icon that was clicked, the state, the host and the component (where relevant). By binding a personal script to this file type in your browser, you can do all sorts of things ...

  • Run rfe on the host source when you click on the compilation icon
  • Run a command to reset the error status when you click on the component error button (om host.component reset).
  • Run a command to reboot the machine when you click on a reboot icon
  • etc ...

The script /usr/bin/lcfg-helper does all of the above (prompting before doing anything serious!)

If you want to roll your own, here is a sample file:


node=ancho
domain=inf.ed.ac.uk
button=compile
state=ok

And here is a trivial script to call rfe when you click on a compilation button ...


#!/bin/sh
. $1
case $button in
  'compile') exec rfe lcfg/$node ;;
  *) xmessage "node=$node.$domain button=$button state=$state" ;;
esac

Topic revision: r1 - 2008-02-07 - squinney
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback