#!/bin/bash # $Id$ #%rlevels: 3:s 0:k #%start: 90 #%stop: 10 #deps #%needs: #%before: #%after: source /etc/conf.d/rc source $rc_functions source /etc/conf.d/mcored case "$1" in start) rc_print "Starting mCore client daemon ..." start-stop-daemon --start --exec /usr/sbin/sslsvd \ --pidfile /var/run/mcored.pid --background --make-pidfile \ -- -U ${SSL_USER} -/ ${CHROOT_DIR} -Z ${SSL_CERT} -K ${SSL_KEY} \ ${OPTS} ${LISTEN_IP} ${LISTEN_PORT} /usr/sbin/mcored evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) rc_print "Stopping mCore client daemon ..." start-stop-daemon --quiet --stop --pidfile /var/run/mcored.pid evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/sslsvd ;; *) rc_echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac