Add an if condition to check if the log directory exists. Create one if it doesn't already exist.
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org --- include/suspend_functions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/suspend_functions.sh b/include/suspend_functions.sh index 5157143..49e1c01 100644 --- a/include/suspend_functions.sh +++ b/include/suspend_functions.sh @@ -52,7 +52,9 @@ if [ $? -ne 0 ]; then fi
# Ensure the log directory exists. -mkdir -p "$LOGDIR" +if [ ! -d "$LOGDIR" ]; then + mkdir -p "$LOGDIR" +fi
setup_wakeup_timer () {