source: src-sh/warden/scripts/rc.d/startup.sh @ 1620346

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

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100755
File size: 733 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 "Starting 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" -a -e "${i}/autostart" ] ; then
29   jIP=`cat ${i}/ip`
30   echo -e "Starting Jail (${jIP})...\c"
31   warden start "${jIP}" >/dev/null 2>/dev/null
32   echo "Done"
33  fi
34done
Note: See TracBrowser for help on using the repository browser.