Bonjour,

je viens d'installer pyload grace a ce tuto :

http://fr.ve-hotech.com/forum/showthread.php?tid=969

le probleme il faut que je lance le service depuis la console et quand je ferme la console le lien ne marche plus

je voudrais savoir comment crée un script de demmarage car la je connait pas du tout :s

j'ai essayer :
#!/bin/sh
### BEGIN INIT INFO
# Provides: pyload
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start pyLoad
# Description: start pyLoad
### END INIT INFO

case "$1" in
start)
echo "Starting pyLoad."
su -c "/home/pyload/pyload/pyLoadCore.py --configdir=/home/pyload/.pyload --daemon" pyload
;;
stop)
echo "Shutting down pyLoad."
su -c "/home/pyload/pyload/pyLoadCore.py --quit" pyload
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0
( en modifiant la ou sont les fichiers)

plus
chmod +x /etc/init.d/pyload
update-rc.d pyload defaults
apres la derniere commande j'ai un message

Starting pyLoad.
identifiant inconnu : pyload

donc je comprend pas trop
#!/bin/sh -e
# Start/Stop rtorrent sous forme de daemon.

NAME=lff
SCRIPTNAME=/etc/init.d/$NAME
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

case $1 in
start)
if [ "$(ps aux | grep -e '.*lftp$' -c)" != 0 ]; then
{
echo "Déja demarré"
}
else
{
echo "Starting "
screen -fn -dmS rtd lftp -f "/home/xcid/scripts/lftp/lftp"
}
fi
;;
stop)
if [ "$(ps aux | grep -e '.*lftp$' -c)" != 0 ]; then
{
echo "Shutting down... "
killall -r "^.*lftp$"
}
else
{
echo "Non demarré"
}
fi
;;
restart)
if [ "$(ps aux | grep -e '.*lftp$' -c)" != 0 ]; then
{
echo "Redemarrage "
killall -r "^.*lftp$"
echo "En cours "
screen -fn -dmS rtd lftp -f "/home/xcid/scripts/lftp/lftp"
}
else
{
echo "Démarrage"
echo "En cours"
screen -fn -dmS rtd lftp -f "/home/xcid/scripts/lftp/lftp"
}
fi
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 2
;;
esac
Un exemple de script avec lff, adapte le
Répondre…