From 80c32de8b4de0b632fe5718bb44cc57b33c3c7cc Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 21 Feb 2024 04:40:45 +0100 Subject: [PATCH] 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 #=================================================