]> git.pld-linux.org Git - packages/rc-scripts.git/blob - 95229.patch
Merge branch 'multiple-pids-in-pidfile'
[packages/rc-scripts.git] / 95229.patch
1 --- /etc/init.d/functions~      2018-09-07 16:57:25.000000000 +0300
2 +++ /etc/init.d/functions       2018-09-07 17:02:41.443552246 +0300
3 @@ -884,12 +883,19 @@
4                         # 3. kill with KILL, wait $waitretry
5                         retry="--retry ${sig#-}/${delay}/${sig#-}/${waittime}/KILL/${waitretry}"
6                 fi
7 -               /sbin/start-stop-daemon -q --stop \
8 -                       $retry \
9 -                       ${waitname:+--name $waitname} \
10 -                       -s ${sig#-} \
11 -                       ${pidfile:+--pidfile $pidfile}
12 -               result=$?
13 +
14 +               # expand if pidfile has multiple pids
15 +               result=0
16 +               local pid
17 +
18 +               for pid in $(cat $pidfile); do
19 +                       /sbin/start-stop-daemon -q --stop \
20 +                               $retry \
21 +                               ${waitname:+--name $waitname} \
22 +                               -s ${sig#-} \
23 +                               --pid $pid || result=$?
24 +               done
25 +
26                 if [ "$result" -eq 0 ]; then
27                         ok
28                 else
This page took 0.05647 seconds and 3 git commands to generate.