mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Better way to check validation
This commit is contained in:
parent
98c807fadc
commit
c0c4009825
@ -531,24 +531,19 @@ function show_crontab {
|
|||||||
function validate_gs_folders {
|
function validate_gs_folders {
|
||||||
MESSAGE="Validating ${PROGRAM} Folders on $HOSTNAME"
|
MESSAGE="Validating ${PROGRAM} Folders on $HOSTNAME"
|
||||||
echo_stat
|
echo_stat
|
||||||
if [ -d $HOME/${LOCAL_FOLDR} ]
|
if [ ! -d $HOME/${LOCAL_FOLDR} ]
|
||||||
then
|
then
|
||||||
|
|
||||||
else
|
|
||||||
MESSAGE="Unable to Find $HOME/${LOCAL_FOLDR}"
|
MESSAGE="Unable to Find $HOME/${LOCAL_FOLDR}"
|
||||||
echo_fail
|
echo_fail
|
||||||
exit_nochange
|
exit_nochange
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD} ]
|
if [ ! -d $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD} ]
|
||||||
then
|
then
|
||||||
|
|
||||||
else
|
|
||||||
MESSAGE="Unable to Find $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}"
|
MESSAGE="Unable to Find $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}"
|
||||||
echo_fail
|
echo_fail
|
||||||
exit_nochange
|
exit_nochange
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo_good
|
echo_good
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -556,24 +551,19 @@ function validate_gs_folders {
|
|||||||
function validate_ph_folders {
|
function validate_ph_folders {
|
||||||
MESSAGE="Validating Pi-hole Configuration on $HOSTNAME"
|
MESSAGE="Validating Pi-hole Configuration on $HOSTNAME"
|
||||||
echo_stat
|
echo_stat
|
||||||
if [ -f ${PIHOLE_BIN} ]
|
if [ ! -f ${PIHOLE_BIN} ]
|
||||||
then
|
then
|
||||||
|
|
||||||
else
|
|
||||||
MESSAGE="Unable to Validate Pi-Hole is Installed"
|
MESSAGE="Unable to Validate Pi-Hole is Installed"
|
||||||
echo_fail
|
echo_fail
|
||||||
exit_nochange
|
exit_nochange
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ${PIHOLE_DIR} ]
|
if [ ! -d ${PIHOLE_DIR} ]
|
||||||
then
|
then
|
||||||
|
|
||||||
else
|
|
||||||
MESSAGE="Unable to Validate Pi-Hole Configuration Directory"
|
MESSAGE="Unable to Validate Pi-Hole Configuration Directory"
|
||||||
echo_fail
|
echo_fail
|
||||||
exit_nochange
|
exit_nochange
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo_good
|
echo_good
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user