tech:systemd_lancer_un_script_a_l_arret
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:systemd_lancer_un_script_a_l_arret [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:systemd_lancer_un_script_a_l_arret [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Systemd lancer un script à l' | ||
| + | |||
| + | Source : http:// | ||
| + | |||
| + | |||
| + | `/ | ||
| + | ~~~ini | ||
| + | [Unit] | ||
| + | Description=Exec before shutdown | ||
| + | |||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | RemainAfterExit=true | ||
| + | ExecStart=/ | ||
| + | ExecStop=/ | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | chmod +x / | ||
| + | systemctl enable jbshutdown.service | ||
| + | systemctl start jbshutdown.service | ||
| + | ~~~ | ||
| + | |||
| + | Le lien symbolique suivant sera crée : | ||
| + | `/ | ||
| + | |||
