From 80c32de8b4de0b632fe5718bb44cc57b33c3c7cc Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 21 Feb 2024 04:40:45 +0100 Subject: [PATCH 1/3] add ardware watchdog device presence check --- scripts/install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/install b/scripts/install index 2ea9cb1..e8afb1a 100644 --- a/scripts/install +++ b/scripts/install @@ -8,6 +8,16 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# WATCHDOG DEVICE CHECK +#================================================= + +ynh_script_progression --message="Checking the hardware watchdog device presence..." + +if [ ! -f /dev/watchdog ]; then + ynh_die --message="Your server doesn't seem to have a '/dev/watchdog' device, this certainly means that it has no hardware watchdog device. However, this package is only relevant if such a device exists, we're sorry." +fi + #================================================= # INSTALL DEPENDENCIES #================================================= From 38fe6ee3135d48099706edd29e7f0ccd19a509ec Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 21 Feb 2024 04:40:50 +0100 Subject: [PATCH 2/3] update docs --- doc/DESCRIPTION.md | 4 ++-- doc/DESCRIPTION_fr.md | 4 ++-- doc/POST_INSTALL.md | 2 +- doc/POST_INSTALL_fr.md | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 doc/POST_INSTALL_fr.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 2210e8d..834fce2 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,5 +1,5 @@ -A watchdog service makes sure your server is still running and reboots it if necessary. -It better (only?) works if your server has a hardware watchdog device. +A watchdog service makes sure your server is still running and reboots it if necessary. +It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer). The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 709eb5b..6fa02b1 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1,5 +1,5 @@ -Un service de surveillance *watchdog* s'assure que votre serveur tourne toujours, et le redémarre si nécessaire. -Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un *watchdog* matériel. +Un service de surveillance *watchdog* s'assure que votre serveur tourne toujours, et le redémarre si nécessaire. +Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un [*watchdog*](https://fr.wikipedia.org/wiki/Chien_de_garde_(informatique)) matériel. Le service inclut ira régulièrement écrire dans `/dev/watchdog`. S'il s'arrête, le plantage est alors détecté et résolu par un redémarrage du système. diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 81db4b1..8af9f20 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,3 +1,3 @@ Your device boot configuration has been updated to enable the hardware watchdog. -Please reboot it. +Please reboot your server. diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md new file mode 100644 index 0000000..26bc230 --- /dev/null +++ b/doc/POST_INSTALL_fr.md @@ -0,0 +1,3 @@ +La configuration de démarrage de votre appareil a été mise à jour pour activer le chien de garde matériel. + +Veuillez redémarrer votre server. From 3641379572f65316bff8dd82cbdd9369682680b0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 21 Feb 2024 03:40:54 +0000 Subject: [PATCH 3/3] Auto-update README --- README.md | 8 ++++---- README_fr.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8976b82..d0f8b80 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -16,8 +16,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -A watchdog service makes sure your server is still running and reboots it if necessary. -It better (only?) works if your server has a hardware watchdog device. +A watchdog service makes sure your server is still running and reboots it if necessary. +It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer). The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted. @@ -43,4 +43,4 @@ or sudo yunohost app upgrade watchdog -u https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 0c117fd..ead8446 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ @@ -16,8 +16,8 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Un service de surveillance *watchdog* s'assure que votre serveur tourne toujours, et le redémarre si nécessaire. -Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un *watchdog* matériel. +Un service de surveillance *watchdog* s'assure que votre serveur tourne toujours, et le redémarre si nécessaire. +Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un [*watchdog*](https://fr.wikipedia.org/wiki/Chien_de_garde_(informatique)) matériel. Le service inclut ira régulièrement écrire dans `/dev/watchdog`. S'il s'arrête, le plantage est alors détecté et résolu par un redémarrage du système.