packages: abrt/abrt.init (NEW) - from abrt-0.0.7.2-3.fc12.src.rpm
glen
glen at pld-linux.org
Wed Oct 14 22:41:49 CEST 2009
Author: glen Date: Wed Oct 14 20:41:49 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- from abrt-0.0.7.2-3.fc12.src.rpm
---- Files affected:
packages/abrt:
abrt.init (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/abrt/abrt.init
diff -u /dev/null packages/abrt/abrt.init:1.1
--- /dev/null Wed Oct 14 22:41:49 2009
+++ packages/abrt/abrt.init Wed Oct 14 22:41:44 2009
@@ -0,0 +1,102 @@
+#!/bin/bash
+# Starts the abrt daemon
+#
+# chkconfig: 35 82 16
+# description: Daemon to detect crashing apps
+# processname: abrtd
+### BEGIN INIT INFO
+# Provides: abrt
+# Required-Start: $syslog $local_fs
+# Required-Stop: $syslog $local_fs
+# Default-Stop: 0 1 2 6
+# Default-Start: 3 5
+# Short-Description: start and stop abrt daemon
+# Description: Listen and dispatch crash events
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+
+#
+# See how we were called.
+#
+
+check() {
+ # Check that we're a privileged user
+ [ `id -u` = 0 ] || exit 4
+
+ # Check if abrt is executable
+ test -x /usr/sbin/abrtd || exit 5
+}
+
+start() {
+
+ check
+
+ # Check if it is already running
+ if [ ! -f /var/lock/subsys/abrt ]; then
+ echo -n $"Starting abrt daemon: "
+ daemon /usr/sbin/abrtd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/abrt
+ echo
+ fi
+ return $RETVAL
+}
+
+stop() {
+
+ check
+
+ echo -n $"Stopping abrt daemon: "
+ killproc /usr/sbin/abrtd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/abrt
+ echo
+ return $RETVAL
+}
+
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+case "$1" in
+start)
+ start
+ ;;
+stop)
+ stop
+ ;;
+reload)
+ reload
+ ;;
+force-reload)
+ echo "$0: Unimplemented feature."
+ RETVAL=3
+ ;;
+restart)
+ restart
+ ;;
+condrestart)
+ if [ -f /var/lock/subsys/abrt ]; then
+ restart
+ fi
+ ;;
+status)
+ status abrt
+ RETVAL=$?
+ ;;
+*)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
+ RETVAL=2
+esac
+
+exit $RETVAL
================================================================
More information about the pld-cvs-commit
mailing list