mirror of
https://github.com/vmstan/gravity-sync.git
synced 2025-06-23 14:20:32 -04:00
Create config file variable
This commit is contained in:
parent
24fe419e70
commit
c789ff5a09
@ -14,10 +14,11 @@ VERSION='1.2.2'
|
|||||||
# You MUST define REMOTE_HOST and REMOTE_USER in a file called 'gravity-sync.conf'
|
# You MUST define REMOTE_HOST and REMOTE_USER in a file called 'gravity-sync.conf'
|
||||||
# You can copy the 'gravity-sync.conf.example' file in the script directory to get started
|
# You can copy the 'gravity-sync.conf.example' file in the script directory to get started
|
||||||
|
|
||||||
# CUSTOMIZATION ########### (not required) ###
|
# STANDARD VARIABLES #########################
|
||||||
|
|
||||||
# GS Folder/File Locations
|
# GS Folder/File Locations
|
||||||
LOCAL_FOLDR='gravity-sync' # must exist in running user home folder
|
LOCAL_FOLDR='gravity-sync' # must exist in running user home folder
|
||||||
|
CONFIG_FILE='gravity-sync.conf' # must exist as explained above
|
||||||
SYNCING_LOG='gravity-sync.log' # will be created in above folder
|
SYNCING_LOG='gravity-sync.log' # will be created in above folder
|
||||||
|
|
||||||
# PH Folder/File Locations
|
# PH Folder/File Locations
|
||||||
@ -40,13 +41,13 @@ NC='\033[0m'
|
|||||||
|
|
||||||
# Import Settings
|
# Import Settings
|
||||||
function import_gs {
|
function import_gs {
|
||||||
echo -e "${CYAN}Importing gravity-sync.conf settings${NC}"
|
echo -e "${CYAN}Importing ${SYNCING_LOG} Settings${NC}"
|
||||||
if [ -f ~/${LOCAL_FOLDR}/gravity-sync.conf ]
|
if [ -f ~/${LOCAL_FOLDR}/${SYNCING_LOG} ]
|
||||||
then
|
then
|
||||||
source gravity-sync.conf
|
source ${SYNCING_LOG}
|
||||||
echo -e "${GREEN}Success${NC}: Configured for ${REMOTE_USER}@${REMOTE_HOST}"
|
echo -e "${GREEN}Success${NC}: Configured for ${REMOTE_USER}@${REMOTE_HOST}"
|
||||||
else
|
else
|
||||||
echo -e "${RED}Failure${NC}: Required file gravity-sync.conf is missing!"
|
echo -e "${RED}Failure${NC}: Required file ${SYNCING_LOG} is missing!"
|
||||||
echo -e "Please review installation documentation for more information"
|
echo -e "Please review installation documentation for more information"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user