set DFS_INITED and do not send login beacon if it was set

This commit is contained in:
xiongdian.me 2023-01-30 17:57:14 +08:00
parent 860ef51441
commit a9850e7e3f
2 changed files with 8 additions and 5 deletions

View File

@ -90,10 +90,12 @@ antigen apply
# end of antigen config
# beacon
if [[ "$EUID" == "0" ]]; then
if [[ -z "$DFS_INITED" && -z "$CI" ]]; then
if [[ "$EUID" == "0" ]]; then
"$DOTFILES/tools/common.sh" apost_beacon "sys.login.root"
else
else
"$DOTFILES/tools/common.sh" apost_beacon "sys.login.user"
fi
fi
# alias
@ -209,3 +211,4 @@ dfs()
# clean
unset i
export DFS_INITED=1

View File

@ -17,7 +17,7 @@ grep -q ".zshrc2" ~/.zshrc
# check scripts and functions
dfs version
dfs log 1
dfs beacon gh.ci
dfs beacon gh.ci $GITHUB_SHA
z ~
test ~ -ef "$(pwd)"
dogo