/[sysadmin-cookbook]/recepies/lxc/lxc-watchdog.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/lxc/lxc-watchdog.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 187 by dpavlin, Tue Mar 16 21:36:45 2010 UTC revision 188 by dpavlin, Tue Mar 16 22:00:20 2010 UTC
# Line 184  reload|force-reload|restart|reboot) Line 184  reload|force-reload|restart|reboot)
184  watchdog)  watchdog)
185          lxc_watchdog $1          lxc_watchdog $1
186          ;;          ;;
187    boot)
188            echo $1 > /var/lib/lxc/$1/on_boot
189            ;;
190    disable)
191            echo -n > /var/lib/lxc/$1/on_boot
192            ;;
193  *)  *)
194          echo "Usage: $0 {start|stop|restart|status}" >&2          echo "Usage: $0 {start|stop|restart|status}" >&2
195          exit 3          exit 3
# Line 194  esac Line 200  esac
200  }  }
201    
202  command=$1  command=$1
 shift  
203    
204  test "$command" = "status" && lxc_status && exit  test "$command" = "status" && lxc_status && exit
205    
# Line 204  if [ -z "$1" ] ; then Line 209  if [ -z "$1" ] ; then
209                  command_on_lxc $command $name                  command_on_lxc $command $name
210          done          done
211  else  else
212            shift
213          while [ ! -z "$1" ] ; do          while [ ! -z "$1" ] ; do
214                  command_on_lxc $command $1                  command_on_lxc $command $1
215                  shift                  shift

Legend:
Removed from v.187  
changed lines
  Added in v.188

  ViewVC Help
Powered by ViewVC 1.1.26