View | Details | Raw Unified | Return to bug 81220
Collapse All | Expand All

(-)nagios/Makefile (+1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	nagios
8
PORTNAME=	nagios
9
PORTVERSION=	2.0.b3
9
PORTVERSION=	2.0.b3
10
PORTREVISION=	1
10
CATEGORIES=	net-mgmt
11
CATEGORIES=	net-mgmt
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITE_SUBDIR=nagios
13
MASTER_SITE_SUBDIR=nagios
(-)nagios/files/nagios.sh.tmpl (+16 lines)
Lines 34-47 Link Here
34
34
35
start_precmd=start_precmd
35
start_precmd=start_precmd
36
stop_postcmd=stop_postcmd
36
stop_postcmd=stop_postcmd
37
restart_precmd=nagios_checkconfig
37
38
38
# set defaults
39
# set defaults
39
40
40
nagios_enable=${nagios_enable:-"NO"}
41
nagios_enable=${nagios_enable:-"NO"}
41
nagios_flags=${nagios_flags:-""}
42
nagios_flags=${nagios_flags:-""}
42
43
44
nagios_checkconfig()
45
{
46
  echo -n 'Performing sanity check on Nagios configuration: '
47
  $NagiosBin -v $NagiosCfg > /dev/null 2>&1
48
  if [ $? != 0 ]; then 
49
    echo 'FAILED.'
50
    echo "Use '$NagiosBin -v $NagiosCfg' command for details."
51
    return 1
52
  else
53
    echo 'OK.'
54
  fi
55
}
56
43
start_precmd()
57
start_precmd()
44
{
58
{
59
  nagios_checkconfig; [ $? != 0 ] && return 1
60
45
  su -m ${nagios_user} -c "touch ${NagiosVar}/nagios.log ${NagiosSav}"
61
  su -m ${nagios_user} -c "touch ${NagiosVar}/nagios.log ${NagiosSav}"
46
  rm -f ${NagiosCmd}
62
  rm -f ${NagiosCmd}
47
}
63
}

Return to bug 81220