From 38ca43c1256b6c73dded9986c20acfb1b1f27b4f Mon Sep 17 00:00:00 2001 From: Thibault Ayanides Date: Tue, 22 Dec 2020 11:49:26 +0100 Subject: [PATCH] Update skel --- src/skel | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/skel b/src/skel index 616ed34..26ee66c 100644 --- a/src/skel +++ b/src/skel @@ -29,6 +29,7 @@ check_config() { # Source Root Dir Parameter if [ -r /etc/default/cis-hardening ]; then + # shellcheck source=../../debian/default . /etc/default/cis-hardening fi if [ -z "$CIS_ROOT_DIR" ]; then @@ -38,5 +39,11 @@ if [ -z "$CIS_ROOT_DIR" ]; then fi # Main function, will call the proper functions given the configuration (audit, enabled, disabled) -[ -r "$CIS_ROOT_DIR"/lib/main.sh ] && . $CIS_ROOT_DIR/lib/main.sh +if [ -r "$CIS_ROOT_DIR"/lib/main.sh ]; then + # shellcheck source=../../lib/main.sh + . "$CIS_ROOT_DIR"/lib/main.sh +else + echo "Cannot find main.sh, have you correctly defined your root directory? Current value is $CIS_ROOT_DIR in /etc/default/cis-hardening" + exit 128 +fi