3 # Copyright (C) 2009 Andy Spencer
4 # See ../COPYING for terms
7 echo 'usage: '$0' <action> [start-|stop-]<service>'
9 echo ' -u,--is-up Test is service is running'
10 echo ' -d,--is-down Test is service is stopped'
11 echo ' -U,--set-up Set service to running'
12 echo ' -D,--set-down Set service to stopped'
13 echo ' -F,--flush Resest all services to stopped'
14 echo ' -q,--query Print the state of a service'
19 state=/lib/mkinit/state
20 if (~ $MKINIT_STATE ?*)
24 service=`{echo $2 | sed s/-.*//}
28 if(! ~ $action -F && ~ $service '')
33 test -e $state/$service
35 test ! -e $state/$service
43 echo -n Service "$service" is
44 test -e $state/$service \