Outils pour utilisateurs

Outils du site


raspberrypi:raspberrypios:systemd

Ceci est une ancienne révision du document !


Lancer un script au démarrage du système

(source : https://doc.ubuntu-fr.org/tutoriel/application_demarrage)

Systemd est le gestionnaire de système qui remplace upstart et son prédécesseur (les scripts system V) depuis Ubuntu 16.04 LTS Xenial.

Créer un fichier "application.service" dans /etc/systemd/system/

[Unit]
Description=<Mettre une description>
[Service]
Type=oneshot 
ExecStart=<Ma commande>
[Install]
WantedBy=multi-user.target

Activer le fichier :

sudo systemctl enable application.service
sudo systemctl start application.service

Différentes commandes :

sudo systemctl enable application.service
sudo systemctl disable application.service
sudo systemctl restart application.service
sudo systemctl status application.service
raspberrypi/raspberrypios/systemd.1645262071.txt.gz · Dernière modification : 2022/02/19 10:14 de dan