features
This commit is contained in:
parent
d1f135c7b6
commit
2d89fbdfd8
1 changed files with 19 additions and 0 deletions
|
@ -53,6 +53,22 @@ gitUserSetup() {
|
|||
chmod 600 "$HOME/.git-credentials"
|
||||
}
|
||||
|
||||
gitDirSetup() {
|
||||
if ping -w2 10.255.255.1; then
|
||||
local location="hl"
|
||||
elif ping -w2 10.69.69.2; then
|
||||
location="hc"
|
||||
fi
|
||||
|
||||
git init .
|
||||
|
||||
git remote add "https://git.k4li.de/homelab/${location}-$(hostname).git"
|
||||
|
||||
git commit -m "Initial script commit"
|
||||
|
||||
git push
|
||||
}
|
||||
|
||||
set_cronjob() {
|
||||
# Color setup using tput
|
||||
local RED=$(tput setaf 1)
|
||||
|
@ -196,3 +212,6 @@ fi
|
|||
|
||||
gitUserSetup
|
||||
set_cronjob
|
||||
|
||||
[[ -d /opt/docker/ ]] &&
|
||||
gitDirSetup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue