diff options
author | Andreas Hüttel <dilfridge@gentoo.org> | 2011-04-24 17:10:05 +0000 |
---|---|---|
committer | Andreas Hüttel <dilfridge@gentoo.org> | 2011-04-24 17:10:05 +0000 |
commit | ebabf50b9edea2655ec01c270c721b3f24e8412f (patch) | |
tree | 6d4fbb643f647b570fd80398951da3527ba3c48e /app-admin/collectd/files | |
parent | Move libunique:3 from the gnome overlay to tree, ~hppa dropped w.r.t. KEYWORD... (diff) | |
download | historical-ebabf50b9edea2655ec01c270c721b3f24e8412f.tar.gz historical-ebabf50b9edea2655ec01c270c721b3f24e8412f.tar.bz2 historical-ebabf50b9edea2655ec01c270c721b3f24e8412f.zip |
Add useflag for perl bindings and static libs, run as unprivileged user; bug 361723. Thanks to Bruno 'bonbons' on #collectd.
Package-Manager: portage-2.1.9.46/cvs/Linux x86_64
Diffstat (limited to 'app-admin/collectd/files')
-rw-r--r-- | app-admin/collectd/files/collectd.confd | 12 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd.initd | 10 |
2 files changed, 15 insertions, 7 deletions
diff --git a/app-admin/collectd/files/collectd.confd b/app-admin/collectd/files/collectd.confd index a08b9175fca5..ebb18efa8dc1 100644 --- a/app-admin/collectd/files/collectd.confd +++ b/app-admin/collectd/files/collectd.confd @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/files/collectd.confd,v 1.1 2010/09/28 15:17:05 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/files/collectd.confd,v 1.2 2011/04/24 17:10:05 dilfridge Exp $ # Nice value used to launch collectd, to change priority of the process. As # you usually will want to run it in background, a default of 5 is used. @@ -13,4 +13,10 @@ # File used to store the PID file. Usually you won't need to touch it. # -#COLLECTD_PIDFILE='/var/run/collectd.pid' +#COLLECTD_PIDFILE='/var/run/collectd/collectd.pid' + +# User to run collectd as (default is collectd, change to root or give +# collectd user appropriate privileges if you use one of the plugins that +# require it, as e.g. ping or iptables plugins) +# +#COLLECTD_USER='collectd' diff --git a/app-admin/collectd/files/collectd.initd b/app-admin/collectd/files/collectd.initd index 3240bfb0732f..6028c93f5efd 100644 --- a/app-admin/collectd/files/collectd.initd +++ b/app-admin/collectd/files/collectd.initd @@ -1,11 +1,12 @@ #!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/files/collectd.initd,v 1.3 2010/12/16 17:33:45 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/files/collectd.initd,v 1.4 2011/04/24 17:10:05 dilfridge Exp $ -: ${COLLECTD_PIDFILE:='/var/run/collectd.pid'} +: ${COLLECTD_PIDFILE:='/var/run/collectd/collectd.pid'} : ${COLLECTD_CFGFILE:='/etc/collectd.conf'} : ${COLLECTD_NICELVL:='5'} +: ${COLLECTD_USER:='collectd'} opts="${opts} configtest" @@ -42,9 +43,10 @@ checkconfig() { start() { checkconfig || return 1 + [ -d /var/run/collectd ] || mkdir /var/run/collectd && chown collectd:collectd /var/run/collectd ebegin "Starting collectd" - start-stop-daemon --start \ + start-stop-daemon --start -c "${COLLECTD_USER}:collectd" \ --nicelevel "${COLLECTD_NICELVL}" --exec /usr/sbin/collectd -- \ -P "${COLLECTD_PIDFILE}" -C "${COLLECTD_CFGFILE}" eend $? "Failed to start collectd" |