Stunnel4 au démarrage ( et autres scripts )
Pour lancer un programme / script au démarrage :
ici stunnel4.
- Editer le script stunnel4 dans /etc/init.d
remplacer les options suivantes :
DEFAULTPIDFILE="/var/run/stunnel4.pid" DAEMON=/usr/bin/stunnel4 NAME=stunnel DESC="SSL tunnels" FILES="/etc/stunnel/svr.conf" OPTIONS="" ENABLED=1 <==0 par défaut
- meme chose dans /etc/default
- dans le répertoire /etc/rcS.d
rajouter un lien symbolique vers stunnel4 en prenant soin de la synthaxe et du numéro attribué
sudo ln -s /etc.init.d/stunnel4 /etc/rcS.d/S52stunnel4
Que contient le répertoire rcS.d ( c est dans la suite ! )
The scripts in this directory whose names begin with an ‘S’ are executed
once when booting the system, even when booting directly into single user
mode. The scripts are all symbolic links whose targets are located in
/etc/init.d/ . To disable a script in this directory, rename it so that it begins with
a ‘K’. For more information see /etc/init.d/README. The following sequence points are defined at this time: * After the S40 scripts have executed, all local file systems are mounted
and networking is available. All device drivers have been initialized. * After the S60 scripts have executed, the system clock has been set, NFS
filesystems have been mounted (unless the system depends on the automounter,
which is started later) and the filesystems have been cleaned.
Donc arrête de pleurer si le rc.local ne se lance pas
c est ici que ca se passe.
ps parcourrir la liste des rep :
rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/ rcS.d/
contiennent différents scripts pour différents moments du boot

Laisser un commentaire
Vous devez être connecté pour rédiger un commentaire.