Georges Mariano wrote:
On Wed, 12 Mar 2003 17:27:30 +0100
Charles Goyard <[EMAIL PROTECTED]> wrote:
Ainsi parlait claude parisot :
http://savannah.nongnu.org/download/debfr-faq/html/debfr-sysinit.html
Et bien, si tu regardes dans le répertoire /etc/init.d/, tu vois - oh
joie - un fichier nommé skeleton, qui est une base pour ce genre de
scripts. Il ne reste plus qu'à l'adapter un peu.
méchant d'enfoncer un peu le clou...
Mais non, je débute c'est tout.
mais au même endroit ...
9.1.5 Lancer un script lors du démarrage
Plusieurs solutions : ...
3.
1. étudier l'exemple /etc/init.d/skeleton
2. puis utiliser update-rc.d
Bon, j'ai -visiblement mal étudié - l'exemple que j'ai sans doute mal
adapté, je le mets en pièce jointe -
SI TU AS LE TEMPS ET L'HUMEUR - pour me dire ce qui ne va pas , la
commande à lancer au démarrage étant
lineakd -b .
Quelle est la commande exacte pour update-rc.D ?
Merci
!?
Avant qu'on ouvre le feu, un bandeau sur les yeux et une dernière
cigarette :-)
A+
#! /bin/sh
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <[EMAIL PROTECTED]>.
# Modified for Debian GNU/Linux
# by Ian Murdock <[EMAIL PROTECTED]>.
#
# Version: @(#)skeleton 1.9.1 08-Apr-2002 [EMAIL PROTECTED]
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/daemon
NAME=daemon
DESC="some daemon"
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME "
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON
echo "."
;;
#reload)
#
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
# echo -n "Reloading $DESC configuration..."
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
# /var/run/$NAME.pid --exec $DAEMON
# echo "done."
#;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC: $NAME"
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
echo "."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/lineakd
NAME=lineakd
DESC=Desktop Manager
test -x lineakd || exit 0
set -b
case "$1" in
start)
echo -n "Starting lineakd"
start-stop-daemon --start --quiet --pidfile /var/run/lineakd.pid \
--exec lineakd
echo "."
;;
stop)
echo -n "Stopping lineakd "
start-stop-daemon --stop --quiet --pidfile /var/run/lineakd.pid \
--exec lineakd
echo "."
;;