summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a22cddf)
raw | patch | inline | side by side (parent: a22cddf)
author | octo <octo> | |
Fri, 16 Dec 2005 12:56:34 +0000 (12:56 +0000) | ||
committer | octo <octo> | |
Fri, 16 Dec 2005 12:56:34 +0000 (12:56 +0000) |
ChangeLog | patch | blob | history | |
Makefile.am | patch | blob | history | |
contrib/init.d-rh7 | [new file with mode: 0755] | patch | blob |
debian/collectd.init.d | [new file with mode: 0755] | patch | blob |
diff --git a/ChangeLog b/ChangeLog
index a5dba072dc83f0bf76fa1ded3d3dcfb609248233..2194ed80a9dbae6aabeca09b0c63ef0a8df4a362 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
-2005-12-07, Version 3.5.0
+2005-12-07, Version 3.5.0 (Revision 321)
* A bug in the `load' module under Solaris has been fixed.
* The `users' module has been contributed by Sebastian Harl. It counts
currently logged in users.
diff --git a/Makefile.am b/Makefile.am
index 30beb6397998679dfb342bf03f770e06522b97f4..d173ee70b0bd9698087dc2cfd3cd460dceed1343 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
find $(distdir) -type d -name '.svn' | xargs rm -rf
install-exec-hook:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
diff --git a/contrib/init.d-rh7 b/contrib/init.d-rh7
--- /dev/null
+++ b/contrib/init.d-rh7
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+ARGS=""
+prog="collectd"
+
+if [ -r /etc/default/$prog ]; then
+ . /etc/default/$prog
+fi
+
+if [ -n "$DATA_DIR" ]; then
+ ARGS="-D $DATA_DIR"
+fi
+
+if [ -n "$PING_HOST" ]; then
+ for HOST in $PING_HOST
+ do
+ ARGS="$ARGS -p $HOST"
+ done
+fi
+
+start () {
+ if [ "x$START_SERVER" = "xyes" ]
+ then
+ echo -n $"Starting $prog (server): "
+ daemon /usr/sbin/collectd -s $ARGS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+ fi
+ if [ "x$START_CLIENT" = "xyes" ]
+ then
+ echo -n $"Starting $prog (client): "
+ daemon /usr/sbin/collectd -c $ARGS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+ fi
+ if [ "x$START_SERVER" != "xyes" -a "x$START_CLIENT" != "xyes" ]
+ then
+ echo -n $"Starting $prog: "
+ daemon /usr/sbin/collectd -l $ARGS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+ fi
+}
+stop () {
+ echo -n $"Stopping $prog: "
+ killproc $prog
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+}
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $prog
+ ;;
+ restart|reload)
+ stop
+ start
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/$prog ] && restart || :
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
+ exit 1
+esac
+
+exit $?
+
+# vim:syntax=sh
diff --git a/debian/collectd.init.d b/debian/collectd.init.d
--- /dev/null
+++ b/debian/collectd.init.d
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# collectd Initscript for collectd
+# http://verplant.org/collectd/
+# Author: Florian Forster <octo@verplant.org>
+#
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Statistics collection daemon"
+NAME=collectd
+DAEMON=/usr/sbin/$NAME
+SCRIPTNAME=/etc/init.d/$NAME
+ARGS=""
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+if [ -r /etc/default/$NAME ]
+then
+ . /etc/default/$NAME
+fi
+
+if [ -n "$DATA_DIR" ]; then
+ ARGS="-D $DATA_DIR"
+fi
+
+if [ -n "$PING_HOST" ]; then
+ for HOST in $PING_HOST
+ do
+ ARGS="$ARGS -p $HOST"
+ done
+fi
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ if [ "x$START_SERVER" = "xyes" ]
+ then
+ $DAEMON -s $ARGS
+ fi
+ if [ "x$START_CLIENT" = "xyes" ]
+ then
+ $DAEMON -c $ARGS
+ fi
+ if [ "x$START_SERVER" != "xyes" -a "x$START_CLIENT" != "xyes" ]
+ then
+ start-stop-daemon --start --quiet --exec $DAEMON -- -l $ARGS
+ fi
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ start-stop-daemon --stop --quiet --exec $DAEMON
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# vim:syntax=sh