- fix UP/DOWN summary on nodes page.
[monitor.git] / monitor-client.init
1 #!/bin/bash
2 #
3 # monitor  Enables the monitor account by setting up the ssh key from the enabled PLC.
4 #
5 # Load before nm, vcached, and vservers, vserver-reference
6 # chkconfig: 3 59 80
7 # description: Fetch monitor ssh key to enable access to machine via monitor immediately.
8 #
9 # Stephen Soltesz <soltesz@cs.princeton.edu>
10 # Copyright (C) 2008 The Trustees of Princeton University
11 #
12 # $Id$
13 #
14
15 case "$1" in
16     start|restart|reload)
17         ;;
18     stop|status)
19         exit 0
20         ;;
21     *)
22         echo $"Usage: $0 {start|stop|restart|status}"
23         exit 1
24         ;;
25 esac
26
27 #
28 # NOTE: This user is not used by monitor for the moment so better not create it.
29 #
30
31 # # NOTE: If user already exists, this just exists with status 9.  I think it's
32 # # ok to simply let this command check and error out.
33 # # Parse PLC configuration
34 # if [ -r /etc/planetlab/plc_config ] ; then
35 #     . /etc/planetlab/plc_config
36 # else
37 #     PLC_NAME="PlanetLab"
38 #     PLC_SLICE_PREFIX="pl"
39 #     PLC_BOOT_HOST="boot.planet-lab.org"
40 # fi
41
42 # USER="${PLC_SLICE_PREFIX}_monitor"
43 # /usr/sbin/useradd -p "" -m $USER &> /dev/null || : 
44
45 # if [ ! -d /home/$USER/.ssh ] ; then
46 #       mkdir /home/$USER/.ssh
47 #       chmod 700 /home/$USER/.ssh
48 #       chown $USER.$USER /home/$USER/.ssh
49 # fi
50
51 # URL="http://${PLC_BOOT_HOST}/PlanetLabConf/keys.php?$USER"
52 # curl -s "$URL" > /home/$USER/.ssh/authorized_keys
53 # chown $USER.$USER /home/$USER/.ssh/authorized_keys