]> git.pld-linux.org Git - packages/abrt.git/commitdiff
- from abrt-0.0.7.2-3.fc12.src.rpm
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 14 Oct 2009 20:41:44 +0000 (20:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    abrt.init -> 1.1

abrt.init [new file with mode: 0644]

diff --git a/abrt.init b/abrt.init
new file mode 100644 (file)
index 0000000..f1dc410
--- /dev/null
+++ b/abrt.init
@@ -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
This page took 0.101987 seconds and 4 git commands to generate.