File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -235,13 +235,6 @@ else
235
235
tar_bin=` which tar`
236
236
fi
237
237
238
- if ! command_exists du ; then
239
- echo " ERROR: du not installed!"
240
- exit 1;
241
- else
242
- du_bin=` which du`
243
- fi
244
-
245
238
if [ -f " ${monit_tmp_dir} /monit-${monit_latest_ver} -${monit_platform} .tar.gz" ]; then
246
239
rm -f " ${monit_tmp_dir} /monit-${monit_latest_ver} -${monit_platform} .tar.gz"
247
240
fi
@@ -253,14 +246,12 @@ if [ ! -f "${monit_tmp_dir}/monit-${monit_latest_ver}-${monit_platform}.tar.gz"
253
246
echo " ERROR: Monit of version ${monit_latest_ver} not found in official web site https://mmonit.com"
254
247
exit 1;
255
248
fi
256
- # monit_arch_size=$(${wget_bin} ${monit_url} --spider --server-response -O - 2>&1 | ${sed_bin} -ne '/Content-Length/{s/.*: //;p}')
257
249
monit_arch_size=$( ${curl_bin} -sI ${monit_url} | grep Content-Length | awk ' {print $2}' | tr -d ' \n' | tr -d ' \r' )
258
250
debug_log " DEBUG: Check monit in official web site... Return file size: ${monit_arch_size} "
259
251
echo -n " Downloading new monit version (v${monit_latest_ver} )... "
260
252
${wget_bin} ${monit_url} -O " ${monit_tmp_dir} /monit-${monit_latest_ver} -${monit_platform} .tar.gz" > /dev/null 2>&1
261
253
if [ -f " ${monit_tmp_dir} /monit-${monit_latest_ver} -${monit_platform} .tar.gz" ]; then
262
254
echo " Done"
263
- # monit_arch_size_on_disk=$(${du_bin} -b "${monit_tmp_dir}/monit-${monit_latest_ver}-${monit_platform}.tar.gz" | cut -f 1)
264
255
monit_arch_size_on_disk=$( ${ls_bin} -l " ${monit_tmp_dir} /monit-${monit_latest_ver} -${monit_platform} .tar.gz" | awk ' {print $5}' )
265
256
debug_log " DEBUG: Check monit archive ${monit_tmp_dir} /monit-${monit_latest_ver} -${monit_platform} .tar.gz on local disk... Size: ${monit_arch_size_on_disk} "
266
257
else
You can’t perform that action at this time.
0 commit comments