summaryrefslogtreecommitdiffstats
path: root/abrt.init
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-03-03 21:04:08 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-03-03 21:04:08 +0100
commit0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f (patch)
tree560f589061acce46928ea03ae6602364002423ee /abrt.init
parent820832e32b5ee5f422261575fc332e038ad94e73 (diff)
downloadabrt-0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f.tar.gz
abrt-0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f.tar.xz
abrt-0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f.zip
Rename to abrt
Diffstat (limited to 'abrt.init')
-rw-r--r--abrt.init101
1 files changed, 101 insertions, 0 deletions
diff --git a/abrt.init b/abrt.init
new file mode 100644
index 00000000..f1aed30e
--- /dev/null
+++ b/abrt.init
@@ -0,0 +1,101 @@
+#!/bin/bash
+# Starts the abrt daemon
+#
+# chkconfig: - 82 16
+# description: Daemon to detect crashing apps
+# processname: abrt
+### BEGIN INIT INFO
+# Provides: abrt
+# Required-Start: $syslog $local_fs
+# Required-Stop: $syslog $local_fs
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: start and stop crash-carcher 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/abrt || 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/abrt
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/abrt
+ echo
+ fi
+ return $RETVAL
+}
+
+stop() {
+
+ check
+
+ echo -n $"Stopping abrt daemon: "
+ killproc /usr/sbin/abrt
+ 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