#!/bin/sh
# Start/stop the ccxstream daemon.
#
# Set SHAREDIR to directory you want to share
# Set OPTIONS to other command line options you want
# si utilisatiuon de "-r" ajouter "-r $SHAREDIR"
 
SHAREDIR=/mnt/ccx
MNTPOINT="-S dnl=/mnt/ed2k -S recup120=/mnt/recup -S vidéos=/mnt/video -S zik=/mnt/zik"
OPTIONS="-f -F /var/run/ccxstream.pid"

test -f /usr/bin/ccxstream || exit 0

case "$1" in
start) echo -n "Start services: ccxstream"
	/usr/bin/ccxstream -r $SHAREDIR $MNTPOINT $OPTIONS
      ;;
stop)	echo -n "Stop services: ccxstream"
	killall ccxstream
      ;;
restart)
	$0 stop
	sleep 2
	$0 start
      ;;
*)    echo "Usage: $0 start|stop|restart"
      exit 1
      ;;
esac
exit 0