#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/lsh/files/lsh.rc,v 1.1 2004/11/23 02:47:12 vapier Exp $ depend() { use logger dns net } check_config() { local vardir="/var/spool/lsh" [ ! -d ${vardir} ] && mkdir ${vardir} [ ! -e ${vardir}/yarrow-seed-file ] && lsh-make-seed -o ${vardir}/yarrow-seed-file if [ ! -e /etc/lsh_host_key ] ; then einfo "Generating DSA-Hostkey..." /usr/bin/lsh-keygen --server -a dsa -l 8 -q | /usr/bin/lsh-writekey --server -q fi return 0 } start() { check_config || return 1 ebegin "Starting lshd" /usr/sbin/lshd --daemonic ${LSHD_OPTS} eend $? } stop() { ebegin "Stopping lshd" start-stop-daemon --stop --pidfile /var/run/lshd.pid eend $? }