mirror of
https://github.com/vmstan/gravity-sync.git
synced 2025-06-07 15:34:12 -04:00
Validate existance of gravity-sync.conf
This commit is contained in:
parent
b65b6fcbfe
commit
d80cf2cb9c
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Gravity Sync by vmstan
|
# Gravity Sync by vmstan
|
||||||
VERSION='1.1.3'
|
VERSION='1.1.4'
|
||||||
|
|
||||||
# Must execute from a location in the home folder of the user who own's it (ex: /home/pi/gravity-sync)
|
# Must execute from a location in the home folder of the user who own's it (ex: /home/pi/gravity-sync)
|
||||||
# Configure certificate based SSH authentication between the Pihole HA nodes - it does not use passwords
|
# Configure certificate based SSH authentication between the Pihole HA nodes - it does not use passwords
|
||||||
@ -11,9 +11,6 @@ VERSION='1.1.3'
|
|||||||
|
|
||||||
# You must define REMOTE_HOST and REMOTE_USER in a file called 'gravity-sync.conf' -- see above documentation
|
# You must define REMOTE_HOST and REMOTE_USER in a file called 'gravity-sync.conf' -- see above documentation
|
||||||
|
|
||||||
# IMPORT SETTINGS
|
|
||||||
source gravity-sync.conf
|
|
||||||
|
|
||||||
# PUSH SETTINGS
|
# PUSH SETTINGS
|
||||||
|
|
||||||
# CUSTOMIZATION
|
# CUSTOMIZATION
|
||||||
@ -34,6 +31,20 @@ NC='\033[0m'
|
|||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
|
# IMPORT SETTINGS
|
||||||
|
if [ -f ~/${LOCAL_FOLDR}/gravity-sync.conf ]
|
||||||
|
then
|
||||||
|
echo -e "${GREEN}Success${NC}: Importing gravity-sync.conf settings"
|
||||||
|
source gravity-sync.conf
|
||||||
|
echo -e "Configured for ${REMOTE_USER}@${REMOTE_HOST}"
|
||||||
|
else
|
||||||
|
echo -e "${RED}Failure${NC}: Required file gravity-sync.conf is missing!"
|
||||||
|
echo -e "Please review installation documentation for more information"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
|
||||||
# print title
|
# print title
|
||||||
# echo -e "${GREEN}Gravity Sync ${VERSION}${NC}"
|
# echo -e "${GREEN}Gravity Sync ${VERSION}${NC}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user