Salut,
J’utilise minidlna comme serveur UpnP pour ma SFR Box.
Je souhaite temporiser son démarrage de façon à ce que le disque sur usb qui contient les médias à lire soit bien totalement accessible.
Le service minidlna démarre par /etc/init.d/minidlna et se configure dans /etc/default/minidlna
Mais je ne trouve pas de paramètre de temporisation.
Suffit-il de mettre au debut de /etc/init.d/minidlna un
J’essai:
root@[code]
desktop:/etc# cat /etc/init.d/minidlna
#!/bin/sh
MiniDLNA initscript
Based on the mediatomb debian package.
Original authors: Tor Krill tor@excito.com
Leonhard Wimmer leo@mediatomb.cc
Andres Mejia mcitadel@gmail.com
Modified by: Benoît Knecht benoit.knecht@fsfe.org
BEGIN INIT INFO
Provides: minidlna
Required-Start: $network $local_fs $remote_fs
Required-Stop:: $network $local_fs $remote_fs
Should-Start: $all
Should-Stop: $all
Default-Start: 2 3 4 5
Default-Stop: 0 1 6
Short-Description: Start minidlna at boot time
Description: Manage the minidlna daemon, a DLNA/UPnP-AV media server.
END INIT INFO
unset USER
PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="DLNA/UPnP-AV media server"
NAME=minidlna
DAEMON=/usr/bin/minidlnad
PIDDIR=/run/$NAME
PIDFILE=$PIDDIR/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
DEFAULT=/etc/default/$NAME
Exit if the package is not installed
[ -x $DAEMON ] || exit 0
Read configuration variable file if it is present
[ -r $DEFAULT ] && . $DEFAULT
Define LSB log_* functions.
Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
Tempo pour attendre le disque usb
sleep 60
Do not start the daemon if NO_START is enabled in DEFAULT
if [ “$START_DAEMON” != “yes” ] && [ “$1” != “stop” ]; then
log_warning_msg "$NAME: Not starting $DESC."
log_warning_msg "$NAME: Disabled in $DEFAULT."
exit 0
fi
[/code]