source: src-sh/warden/install.sh @ 0604f47

releng/10.0
Last change on this file since 0604f47 was 0604f47, checked in by Kris Moore <kris@…>, 11 months ago

Fix warden.conf getting clobbered during package upgrade

  • Property mode set to 100755
File size: 929 bytes
Line 
1#!/bin/sh
2# Warden install script
3
4DEFAULT="/usr/local"
5
6if [ -z "$1" ] ; then
7        LB="${DEFAULT}"
8else
9        LB="${1}"
10fi
11
12PROGDIR="${LB}/share/warden"
13
14mkdir -p ${PROGDIR} >/dev/null 2>/dev/null
15
16mkdir ${PROGDIR}/tmp >/dev/null 2>/dev/null
17mkdir ${PROGDIR}/export >/dev/null 2>/dev/null
18
19DIR=`dirname $0`
20cd ${DIR}
21
22cp bin/warden ${LB}/bin/warden
23chmod 755 ${LB}/bin/warden
24
25cp conf/warden.conf ${LB}/etc/warden.conf.dist
26chmod 644 ${LB}/etc/warden.conf.dist
27
28if [ -d "${PROGDIR}/linux-installs" ] ; then
29  rm -rf ${PROGDIR}/linux-installs
30fi
31cp -r linux-installs ${PROGDIR}
32
33if [ -d "${PROGDIR}/scripts" ] ; then
34  rm -rf ${PROGDIR}/scripts
35fi
36
37cp -r scripts ${PROGDIR}
38chmod 755 ${PROGDIR}/scripts/backend/*
39
40# Setup rc.d
41cp scripts/rc.d/wardenrc ${LB}/etc/rc.d/wardenrc
42chmod 755 ${LB}/etc/rc.d/wardenrc
43
44cp agent.png ${PROGDIR}/
45cp agent.png ${PROGDIR}/warden.png
46
47mkdir ${PROGDIR}/bin >/dev/null 2>/dev/null
48
49exit 0
Note: See TracBrowser for help on using the repository browser.