Je souhaite réaliser un script pour pouvoir lancer un programme ( écris en python ) pendant la phase d'allumage de la raspberry ( avant même de se connecter ).
Cependant je n'arrive pas à bien y arriver. Voilà ci dessous mon code actuel.
Code: Select all
#!/bin/bash
### BEGIN INIT INFO
# Provides: scriptlancement
# Required-Start:
# Required-Stop:
# X-Start-Before:
# X-Stop-After:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-interactive: true
# Short-Description: lancement
# Description: Fonctionnement aléatoire du robot
### END INIT INFO
case $ in
'start')
echo "lancement du script pour la marche de R2D2"
sudo python "/home/pi/Documents/PythonTest/principal.py"
;;
'stop')
;;
esac
exit 0Cordialement.