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 {
|
||||
MESSAGE="Validating ${PROGRAM} Folders on $HOSTNAME"
|
||||
echo_stat
|
||||
if [ -d $HOME/${LOCAL_FOLDR} ]
|
||||
if [ ! -d $HOME/${LOCAL_FOLDR} ]
|
||||
then
|
||||
|
||||
else
|
||||
MESSAGE="Unable to Find $HOME/${LOCAL_FOLDR}"
|
||||
echo_fail
|
||||
exit_nochange
|
||||
fi
|
||||
|
||||
if [ -d $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD} ]
|
||||
if [ ! -d $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD} ]
|
||||
then
|
||||
|
||||
else
|
||||
MESSAGE="Unable to Find $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}"
|
||||
echo_fail
|
||||
exit_nochange
|
||||
fi
|
||||
|
||||
echo_good
|
||||
}
|
||||
|
||||
@ -556,24 +551,19 @@ function validate_gs_folders {
|
||||
function validate_ph_folders {
|
||||
MESSAGE="Validating Pi-hole Configuration on $HOSTNAME"
|
||||
echo_stat
|
||||
if [ -f ${PIHOLE_BIN} ]
|
||||
if [ ! -f ${PIHOLE_BIN} ]
|
||||
then
|
||||
|
||||
else
|
||||
MESSAGE="Unable to Validate Pi-Hole is Installed"
|
||||
echo_fail
|
||||
exit_nochange
|
||||
fi
|
||||
|
||||
if [ -d ${PIHOLE_DIR} ]
|
||||
if [ ! -d ${PIHOLE_DIR} ]
|
||||
then
|
||||
|
||||
else
|
||||
MESSAGE="Unable to Validate Pi-Hole Configuration Directory"
|
||||
echo_fail
|
||||
exit_nochange
|
||||
fi
|
||||
|
||||
echo_good
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user