]> git.pld-linux.org Git - packages/dictd.git/commitdiff
- maked
authormis <mis@pld-linux.org>
Wed, 19 Jul 2000 17:13:06 +0000 (17:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dictd.init -> 1.1
    dictd.sysconfig -> 1.1

dictd.init [new file with mode: 0644]
dictd.sysconfig [new file with mode: 0644]

diff --git a/dictd.init b/dictd.init
new file mode 100644 (file)
index 0000000..39aace1
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# dictd:       Starts the Dictionary Daemon
+#
+# chkconfig:   345 90 10
+# description: This is a daemon for the Dictionary Server Protocol (DICT), \
+#               a TCP transaction based query/response protocol that allows \
+#               a client to access dictionary definitions from a set of \
+#              natural language dictionary databases.
+# processname: dictd
+# config:      /etc/dictd.conf
+
+DAEMON_FILE=dictd
+DAEMON_NAME="Dictionary Daemon"  
+
+# Sanity checks.
+[ -f /etc/${DAEMON_FILE}.conf ] || exit 0
+[ -x /usr/sbin/${DAEMON_FILE} ] || exit 0
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+if is_no "${NETWORKING}"; then
+       msg_Network_Down ${DAEMON_FILE}
+        exit 1
+fi
+
+# Get sysconfig
+[ -f /etc/sysconfig/${DAEMON_FILE} ] && . /etc/sysconfig/${DAEMON_FILE}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+    start)
+       if [ ! -f /var/lock/subsys/${DAEMON_FILE} ]; then
+               msg_starting ${DAEMON_NAME}
+               daemon ${DAEMON_FILE} ${DICTD_OPTS}
+               pidofproc ${DAEMON_FILE} >/dev/null 2>&1
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/${DAEMON_FILE}
+       else
+               msg_Already_Running ${DAEMON_NAME}
+               exit 1
+       fi
+        ;;
+    stop)
+       if [ -f /var/lock/subsys/${DAEMON_FILE} ]; then
+               msg_stopping ${DAEMON_NAME}
+               busy
+               killproc /usr/sbin/${DAEMON_FILE} 
+               rm -f /var/lock/subsys/${DAEMON_FILE} >/dev/null 2>&1
+       else
+               msg_Not_Running ${DAEMON_NAME}
+               exit 1
+       fi      
+       ;;
+  status)
+        status ${DAEMON_FILE}
+        ;;
+  restart|reload)
+        $0 stop
+        $0 start
+        ;;
+    *)
+       msg_Usage "$0 {start|stop|status|restart|reload}"
+       exit 1
+       ;;
+esac
+
+exit $RETVAL
diff --git a/dictd.sysconfig b/dictd.sysconfig
new file mode 100644 (file)
index 0000000..52401a7
--- /dev/null
@@ -0,0 +1,7 @@
+# sysconfig for dictd
+
+# Define nice level for nscd 
+SERVICE_RUN_NICE_LEVEL="+0"
+
+# Cmdline options (see dictd(8))
+DICTD_OPTS="--syslog --limit 5"
This page took 0.046961 seconds and 4 git commands to generate.