updated on Sun Jan 22 12:09:12 UTC 2012
[aur-mirror.git] / finit-arc / stop-services.sh
blob4eae60491291618557d3a942de3494ce83de3136
1 #!/bin/sh
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 # Shutdown daemons
7 let i=${#DAEMONS[@]}
8 while [ $i -ge 0 ]; do
9 if [ "${DAEMONS[$i]:0:1}" != '!' ]; then
10 ck_daemon ${DAEMONS[$i]#@} || stop_daemon ${DAEMONS[$i]#@}
12 let i=i-1
13 done
14 # find any leftover daemons and shut them down in reverse order
15 if [ -d /var/run/daemons ]; then
16 for daemon in $(/bin/ls -1t /var/run/daemons); do
17 stop_daemon $daemon
18 done