cmd+=" --verbose"
fi
cmd+=" \"${BACKUP_HOSTDIR}\" \"${rhost}:${BACKUP_PARENTDIR}\""
- if [[ "${QUIET}" == "y" ]] ; then
+ if [[ "${QUIET}" ]] ; then
cmd+=" >> \"${LOGFILE}\" 2>&1"
else
cmd+=" 2>&1 | tee -a \"${LOGFILE}\""
empty_line
info "Status of '${CYAN}${service}${NORMAL}':"
svc_status=$( systemctl status "${service}" 2>&1 )
- if [[ "${QUIET}" != "y" ]] ; then
+ if [[ -z "${QUIET}" ]] ; then
echo "${svc_status}"
fi
MAIL_BODY+="\n$( my_date ): Status of service '${service}':\n${svc_status}\n"
DEBUG=""
DO_ASK=""
SIMULATE=""
-QUIET="n"
+QUIET=""
LOGFILE=
done
fi
- if [[ "${VERBOSE}" && "${QUIET}" == "y" ]] ; then
+ if [[ "${VERBOSE}" && "${QUIET}" ]] ; then
error "The options '${RED}--verbose${NORMAL}' and '${RED}--quiet${NORMAL}' are mutually exclusive."
echo
usage >&2
if [[ -n "${LOGFILE}" ]] ; then
echo -e "[${ts}] [${BASE_NAME}:${GREEN}INFO${NORMAL}] : $@" >>"${LOGFILE}"
fi
- if [[ "${QUIET}" != "y" ]] ; then
+ if [[ -z "${QUIET}" ]] ; then
echo -e " ${GREEN}*${NORMAL} [${ts}] [${BASE_NAME}:${GREEN}INFO${NORMAL}] : $@" >&2
fi
}
echo "${l}" >>"${LOGFILE}"
fi
- if [[ "${QUIET}" == "y" ]] ; then
+ if [[ "${QUIET}" ]] ; then
return
fi
echo "${l}"
echo >>"${LOGFILE}"
fi
- if [[ "${QUIET}" == "y" ]] ; then
+ if [[ "${QUIET}" ]] ; then
return
fi
echo