mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Validate cron log existance
This commit is contained in:
parent
ff0c8c5fd5
commit
8965fadcc7
@ -327,15 +327,25 @@ case $# in
|
||||
;;
|
||||
|
||||
cron)
|
||||
if [ -f $HOME/${LOCAL_FOLDR}/${CRONJOB_LOG} ]
|
||||
CRONPATH="$HOME/${LOCAL_FOLDR}/${CRONJOB_LOG}"
|
||||
|
||||
MESSAGE="Replaying Last Cronjob"
|
||||
echo -e "${STAT} ${MESSAGE}"
|
||||
|
||||
if [ -f ${CRONPATH} ]
|
||||
then
|
||||
MESSAGE="Replaying Last Cronjob"
|
||||
echo -e "${GOOD} ${MESSAGE}"
|
||||
if [ -s ${CRONPATH} ]
|
||||
echo -e "${GOOD} ${MESSAGE}"
|
||||
logs_crontab
|
||||
then
|
||||
echo -e "${FAIL} ${MESSAGE}"
|
||||
echo -e "${YELLOW}${CRONPATH}${NC} appears empty"
|
||||
exit_nochange
|
||||
fi
|
||||
else
|
||||
MESSAGE="Replaying Last Cronjob"
|
||||
echo -e "${FAIL} ${MESSAGE}"
|
||||
exit_nochange
|
||||
echo -e "${YELLOW}${CRONPATH}${NC} cannot be located"
|
||||
exit_nochange
|
||||
fi
|
||||
|
||||
exit_nochange
|
||||
@ -351,7 +361,8 @@ case $# in
|
||||
;;
|
||||
|
||||
*)
|
||||
echo -e "${FAIL} Too Many Arguments"
|
||||
MESSAGE="Too Many Arguments"
|
||||
echo -e "${FAIL} ${MESSAGE}"
|
||||
list_gs_arguments
|
||||
exit_nochange
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user