Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2018 12:19:57 +0000 (UTC)
From:      Lars Engels <lme@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r481898 - in head/net-mgmt/icinga2: . files
Message-ID:  <201810121219.w9CCJvmT097400@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lme
Date: Fri Oct 12 12:19:57 2018
New Revision: 481898
URL: https://svnweb.freebsd.org/changeset/ports/481898

Log:
  net-mgmt/icinga2:
  
  - Fix directory permissions after upgrading icinga2 via pkg
  - Whitespace fixes in icinga2.in
  - Bump PORTREVISION
  
  PR:		227965, 227107
  Submitted by:	O. Hartmann <ohartmann@walstatt.org>
  MFH:		2018Q4

Modified:
  head/net-mgmt/icinga2/Makefile
  head/net-mgmt/icinga2/files/icinga2.in

Modified: head/net-mgmt/icinga2/Makefile
==============================================================================
--- head/net-mgmt/icinga2/Makefile	Fri Oct 12 12:11:12 2018	(r481897)
+++ head/net-mgmt/icinga2/Makefile	Fri Oct 12 12:19:57 2018	(r481898)
@@ -3,6 +3,7 @@
 PORTNAME=	icinga2
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.9.2
+PORTREVISION=	1
 CATEGORIES=	net-mgmt
 
 MAINTAINER=	lme@FreeBSD.org

Modified: head/net-mgmt/icinga2/files/icinga2.in
==============================================================================
--- head/net-mgmt/icinga2/files/icinga2.in	Fri Oct 12 12:11:12 2018	(r481897)
+++ head/net-mgmt/icinga2/files/icinga2.in	Fri Oct 12 12:19:57 2018	(r481898)
@@ -19,7 +19,7 @@
 
 . /etc/rc.subr
 
-# Add /usr/local/bin to path, so that the notification scripts 
+# Add /usr/local/bin to path, so that the notification scripts
 # can work (#!/usr/bin/env bash)
 export PATH=$PATH:%%LOCALBASE%%/bin:%%PREFIX%%/sbin
 
@@ -86,7 +86,6 @@ reload_precmd() {
 start_precmd() {
   if checkyesno "icinga2_mkvar"; then
     # Create necessary directories / change ownership
-    # 
     # While this is also done through pkg-plist, /var might be on a ramdisk,
     # so make sure all needed files and directories are created before starting
     # Icinga.
@@ -96,16 +95,17 @@ start_precmd() {
              "${icinga2_rundir}" "${icinga2_cachedir}"; do
         if [ ! -d "${d}" ]; then
           install -d -o ${icinga2_user} -g ${icinga2_group} "${d}"
-        else
-          chown ${icinga2_user}:${icinga2_group} "${d}"
         fi
     done
 
-    install -d -o ${icinga2_user} -g %%WWWGRP%% "${icinga2_rundir}/cmd" 
+    install -d -o ${icinga2_user} -g www "${icinga2_rundir}/cmd"
 
-    chown -R ${icinga2_user}:${icinga2_user} "${icinga2_libdir}"
-    chown -R ${icinga2_user}:${icinga2_user} "${icinga2_spooldir}"
   fi
+
+  chown -R ${icinga2_user}:${icinga2_group} "${icinga2_libdir}"
+  chown -R ${icinga2_user}:${icinga2_group} "${icinga2_spooldir}"
+  chown -R ${icinga2_user}:${icinga2_group} "${icinga2_cachedir}"
+  chown -R ${icinga2_user}:www "${icinga2_rundir}/cmd"
 
   if ! icinga2_checkconfig; then
     return 1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810121219.w9CCJvmT097400>