From 7d46f25d86d852481b337a6ee4273a3c7fd832b9 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 10 Sep 2018 02:41:02 +0200 Subject: [PATCH] [fix] Avoid error in cron if executed in an other dir --- monitor-ynh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor-ynh b/monitor-ynh index 5ce5320..31b431e 100755 --- a/monitor-ynh +++ b/monitor-ynh @@ -1,6 +1,6 @@ #!/bin/bash - -source ./monitor-ynh-settings +script_dir="$(dirname "$0")" +source $script_dir/monitor-ynh-settings IPV4=false if ping -c 1 9.9.9.9 &> /dev/null && dig +short A wikipedia.fr &> /dev/null; then