Actualiser automated_shutdown/read.md
This commit is contained in:
@@ -6,22 +6,25 @@ Crée un fichier /etc/systemd/system/eth-monitor.service :
|
|||||||
<code>sudo nano /etc/systemd/system/eth-monitor.service</code>
|
<code>sudo nano /etc/systemd/system/eth-monitor.service</code>
|
||||||
|
|
||||||
Colle ce contenu :
|
Colle ce contenu :
|
||||||
|
<code>
|
||||||
<code>
|
<code>
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Ethernet Connection Monitor
|
Description=Ethernet Connection Monitor
|
||||||
After=network.target
|
After=network.target
|
||||||
|
</code>
|
||||||
|
<code>
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/local/bin/check_eth_connection.sh
|
ExecStart=/usr/local/bin/check_eth_connection.sh
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=60
|
RestartSec=60
|
||||||
TimeoutStopSec=5
|
TimeoutStopSec=5
|
||||||
|
</code>
|
||||||
|
<code>
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
</code>
|
</code>
|
||||||
|
</code>
|
||||||
|
|
||||||
|
|
||||||
c. Créer le timer systemd pour déclencher l’extinction
|
c. Créer le timer systemd pour déclencher l’extinction
|
||||||
|
|||||||
Reference in New Issue
Block a user