#!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { use net } start() { ebegin "Starting uShare" # Sanity check to avoid ushare failling on booting with no # shared dirs if [[ -z "${USHARE_DIRS}" ]] ; then eerror "Please set shared dirs in /etc/conf.d/ushare" return 1 fi start-stop-daemon --start --quiet -c ${USHARE_USER:-root} \ --exec /usr/bin/ushare -- -D -i ${USHARE_IFACE} \ -n ${USHARE_NAME} ${USHARE_OPTS} ${USHARE_DIRS} eend $? } stop() { ebegin "Stopping uShare" start-stop-daemon --stop --quiet --exec /usr/bin/ushare eend $? }