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

Annotation of /rpms/runit/sme9/runit.svup

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


Revision 1.1 - (hide annotations) (download)
Fri Jan 25 18:40:43 2013 UTC (11 years, 10 months ago) by slords
Branch: MAIN
CVS Tags: runit-2_0_0-1_el6_sme, runit-2_1_2-1_el6_sme, HEAD
Initial import

1 slords 1.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