You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cd /usr/local/src/maldetect-*/ || { echo"Error: Failed to locate extracted maldetect directory in /usr/local/src">&2;exit 1; }
23
+
download_and_extract "https://www.rfxn.com/downloads/maldetect-current.tar.gz""/usr/local/src/maldetect-current.tar.gz""/usr/local/src"|| { echo"Error: Failed to download and extract Maldet from https://www.rfxn.com/downloads/maldetect-current.tar.gz">&2;exit 1; }
24
+
shopt -s nullglob
25
+
maldet_dirs=(/usr/local/src/maldetect-*/)
26
+
shopt -u nullglob
27
+
if [ "${#maldet_dirs[@]}"-ne 1 ];then
28
+
echo"Error: Expected exactly one extracted maldetect directory in /usr/local/src, found ${#maldet_dirs[@]}">&2
29
+
exit 1
30
+
fi
31
+
cd"${maldet_dirs[0]}/"|| { echo"Error: Failed to change to extracted maldetect directory">&2;exit 1; }
0 commit comments