/[smeserver]/rpms/runit/sme7/runit.svup
ViewVC logotype

Contents of /rpms/runit/sme7/runit.svup

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Jun 12 17:21:02 2007 UTC (16 years, 11 months ago) by slords
Branch: MAIN
CVS Tags: runit-1_7_2-1_el4_sme, runit-2_0_0-1_el4_sme, HEAD
Import on branch sme7 of package runit-1.7.2-1.el4.sme.src.rpm

1 #!/bin/sh
2
3 [ -z $SV_RETRYTIME ] && SV_RETRYTIME=1
4 [ -z $SV_WAITTIME ] && SV_WAITTIME=1
5
6 # Check if this service is already up; avoids useless recursion
7 svisup $1 && exit 0
8
9 if [ -d $1/updeps ]; then
10 # We have dependencies to check
11
12 for DEPENDENCY in $1/updeps/*; do
13 # start svup in background so they will run in parallel
14 svup $DEPENDENCY &
15 done
16
17 # Wait for all services to be up
18 svwaitup -r $SV_RETRYTIME -s $SV_WAITTIME $1/updeps/* || exit 111
19 fi
20
21 # Ensure that a supervisor is running for this service
22 # this is postponed to here in order to get more parallelism on boot =)
23 until svok $1; do sleep $SV_RETRYTIME; done
24
25 # actually start the service
26 svc -u $1 || exit 111
27
28 exit 0
29

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed