J'ai une seule commande dans mon script /etc/rc.local
qui est censé démarrer le démon de mise à jour pour Tiny Tiny RSS au démarrage, mais le script n'est pas exécuté au démarrage. Pourquoi?
Le fichier /etc/rc.local entier:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/sbin/start-stop-daemon -b -c www-data:www-data -S -x /usr/bin/php /var/www/ttrss/update_daemon2.php -- -quiet
exit 0
/etc/rc.local
est exécutable:
# ls -l /etc/rc.local
-rwxr-xr-x 1 root root 342 May 25 16:14 /etc/rc.local
/etc/init.d/rc.local
existe et est exécutable:
# ls -l /etc/init.d/rc.local
-rwxr-xr-x 1 root root 801 Jul 27 2012 /etc/init.d/rc.local
/etc/init.d/rc.local
est supposé être exécuté au démarrage pour ce niveau d'exécution:
# runlevel
N 2
# ls -l /etc/rc2.d/S99rc.local
lrwxrwxrwx 1 root root 18 Sep 22 2012 /etc/rc2.d/S99rc.local -> ../init.d/rc.local
Si j'appelle manuellement /etc/rc.local depuis la ligne de commande, update_daemon se charge ...
# /etc/rc.local
# ps ax | grep update_daemon2.php
2233 ? S 0:00 /usr/bin/php /media/sda5/www/news/update_daemon2.php -quiet
2234 ? S 0:00 /usr/bin/php /media/sda5/www/news/update_daemon2.php -quiet
que je dois me souvenir de faire chaque fois que mon serveur redémarre jusqu'à ce que ce problème soit résolu.
Similar questions < a href="https://askubuntu.com/q/239600/161623"> déjà , mais jusqu'à présent, je n'ai pas pu appliquer les informations à mon problème spécifique.
Pourquoi la commande dans rc.local n’est-elle pas exécutée au démarrage?