|
|
|
@ -6,6 +6,24 @@ GREEN="\e[32m"
|
|
|
|
|
ENDCOLOR="\e[0m"
|
|
|
|
|
TICK="[$GREEN+$ENDCOLOR] "
|
|
|
|
|
|
|
|
|
|
pre_check(){
|
|
|
|
|
user=$(hostname)
|
|
|
|
|
mkdir -p ~/.config/autodeploy/
|
|
|
|
|
if test -f ~/.config/autodeploy/"$user"_config.txt ;then
|
|
|
|
|
echo "File exists"
|
|
|
|
|
. ~/.config/autodeploy/"$user"_config.txt
|
|
|
|
|
else
|
|
|
|
|
echo "config_name=$(hostname)" > ~/.config/autodeploy/config.txt
|
|
|
|
|
echo "remote_repo="https://github.com/grahamhelton"" >> ~/.config/autodeploy/config.txt
|
|
|
|
|
. ~/.config/autodeploy/config.txt
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
echo $config_name
|
|
|
|
|
echo $remote_repo
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pre_check
|
|
|
|
|
get_posture(){
|
|
|
|
|
# This function is used to determine what kind of system the script is being deployed on. It will check for the following items:
|
|
|
|
|
# 1. Internet connectivity
|
|
|
|
@ -31,9 +49,7 @@ get_posture(){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_posture
|
|
|
|
|
|
|
|
|
|
next_function(){
|
|
|
|
|
echo $internet
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|