Bonjour à tous!
Voila, je viens d'installer icecast2 et liquidsoap, j'ai creé les user et group "liquidsoap". icecast2 fonctionne parfaitement, liquidsoap fonctionne lui aussi très bien quand je le lance avec le user "liquidsoap".
Maintenant je cherche à le lancer en daemon dans /etc/init.d/liquidsoap.sh. Et d'ailleurs, je vous le liste plus loin.
Et je me prend une erreur :
Citation :
root@Balthazar /etc/init.d # ./liquidsoap.sh start Starting channels: liquidsoap.liq start-stop-daemon: --start needs --exec or --startas Try 'start-stop-daemon --help' for more information. ./liquidsoap.sh: 148: --chuid: not found OK
|
liquidsoap.liq est un fichier de conf, un "liquidsoap --check /etc/liquidsoap/liquidsoap.liq" me confirme qu'il est bon.
Que faire..?
Code :
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides: liquidsoap
- # Required-Start: $remote_fs $network $time
- # Required-Stop: $remote_fs $network $time
- # Should-Start:
- # Should-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Starts the liquidsoap daemon
- # Description:
- ### END INIT INFO
- user=liquidsoap
- group=liquidsoap
- prefix=/usr
- exec_prefix=${prefix}
- confdir=/etc/liquidsoap
- liquidsoap=${exec_prefix}/bin/liquidsoap
- rundir=/var/run/liquidsoap
- # Test if $rundir exists
- if [ ! -d $rundir ]; then
- mkdir -p $rundir;
- chown $user:$group $rundir
- fi
- case $# in
- 1)
- case "$1" in
- stop)
- echo -n "Stopping channels: "
- cd $rundir
- for liq in *.pid ; do
- if test $liq != '*.pid' ; then
- echo -n "$liq "
- start-stop-daemon --stop --quiet --pidfile $liq --retry 4
- fi
- done
- echo "OK"
- ;;
- start)
- echo -n "Starting channels: "
- cd $confdir
- for liq in *.liq ; do
- if test $liq != '*.liq' ; then
- echo -n "$liq "
- start-stop-daemon --start --quiet --pidfile $rundir/${liq%.liq}.pid \ --chuid $user:$group --exec $liquidsoap -- -d $confdir/$liq
- fi
- done
- echo "OK"
- ;;
- list)
- echo "Listing channels: "
- cd $rundir
- for liq in *.pid ; do
- if test $liq != '*.pid' ; then
- echo -n "$liq ID:"
- cat $liq
- ps -l -p $(cat $liq )
- echo ""
- fi
- done
- echo "OK"
- ;;
- restart|force-reload)
- $0 stop
- $0 start
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|force-reload}[ $1 {channelname}]"
- exit 1
- ;;
- esac
- ;;
|
Message édité par Lycos5 le 31-05-2011 à 14:30:28
---------------
FlickR | Speed matters | gtag:Arkht