#!/bin/bash [[ -f /etc/sysconfig/nscd ]] && . /etc/sysconfig/nscd PROGRAM=/usr/sbin/nscd ARGS="--config-file=/etc/nscd.conf --nthreads=${NTHREADS:=4}" RUNLEVEL=3 NEEDS="+network +remote_fs" RECOMMENDED=yes . /etc/init.d/smgl_init start() { [[ -d /var/run/nscd ]] || mkdir -p /var/run/nscd [[ -d /var/cache/nscd ]] || mkdir -p /var/cache/nscd echo "Starting Name Service Cache Daemon..." $PROGRAM $ARGS evaluate_retval } stop() { echo "Stopping Name Service Cache Daemon..." $PROGRAM --shutdown evaluate_retval } reload() { echo "Cleaning up cache..." for table in $TABLES; do $PROGRAM --invalidate $table [[ $? -eq 0 ]] || error=$? done if [ ! -z $error ]; then print_status failure exit $error fi evaluate_retval } status() { $PROGRAM --statistics } .