source: src-sh/warden/scripts/rc.d/shutdown.sh @ 0988d23

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since 0988d23 was 0988d23, checked in by Kris Moore <kris@…>, 21 months ago

Add my working directory for the new warden backend changes.

Includes patches from John Hixson (john@…) to change
how warden uses "nicknames" instead of IP addresses for jail
identification.

  • Property mode set to 100755
File size: 782 bytes
Line 
1#!/bin/sh
2# Starts up the warden service
3######################################################################
4
5PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
6export PATH
7
8# Source our functions
9PROGDIR="/usr/local/share/warden"
10
11if [ -z "${PROGDIR}" ]
12then
13   echo "PROGDIR unset! Is The Warden installed properly?"
14   exit 155
15fi
16
17# Source our variables
18. ${PROGDIR}/scripts/backend/functions.sh
19
20echo "Stopping the Warden"
21
22# If no jails we can exit
23if [ ! -d "${JDIR}" ] ; then exit 0 ; fi
24
25cd ${JDIR}
26for i in `ls -d .*.meta 2>/dev/null`
27do
28  if [ ! -e "${i}/ip" ] ; then continue; fi
29  jIP="`cat ${i}/ip`"
30
31  ${PROGDIR}/scripts/backend/checkstatus.sh "${jIP}" 2>/dev/null
32  if [ "$?" = "0" ] ; then
33    echo "Stopping jail (${jIP})"
34    warden stop "${jIP}" "FAST"
35  fi
36done
37
Note: See TracBrowser for help on using the repository browser.