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
Copy file name to clipboardExpand all lines: snapraid-aio-script.sh
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
######################
9
9
# SCRIPT VARIABLES #
10
10
######################
11
-
SNAPSCRIPTVERSION="3.4"#DEV2
11
+
SNAPSCRIPTVERSION="3.4"#DEV3
12
12
13
13
# Read SnapRAID version
14
14
SNAPRAIDVERSION="$(snapraid -V | sed -e 's/snapraid v\(.*\)by.*/\1/')"
@@ -97,6 +97,16 @@ function main(){
97
97
fi
98
98
fi
99
99
100
+
### Check if SnapRAID is found
101
+
if [ -z"$SNAPRAID_BIN" ];then
102
+
echo"**ERROR**: SnapRAID binary not found in PATH. Please check if SnapRAID is installed correctly and found in the PATH environment values of your system."
103
+
mklog "WARN: SnapRAID binary not found in PATH. Please check if SnapRAID is installed correctly and found in the PATH environment values of your system."
104
+
SUBJECT="[WARNING] - SnapRAID binary not found in PATH $EMAIL_SUBJECT_PREFIX"
105
+
NOTIFY_OUTPUT="$SUBJECT"
106
+
notify_warning
107
+
exit 1
108
+
fi
109
+
100
110
### Check if SnapRAID is already running
101
111
if pgrep -x snapraid >/dev/null;then
102
112
echo"The script has detected SnapRAID is already running. Please check the status of the previous SnapRAID job before running this script again."
0 commit comments