Browse Source

don't touch if the file exists

pull/32/head
Smaine Kahlouch 9 years ago
parent
commit
b2afbfd4fb
1 changed files with 4 additions and 1 deletions
  1. 5
      roles/kubernetes/node/files/kube-gen-token.sh

5
roles/kubernetes/node/files/kube-gen-token.sh

@ -19,7 +19,10 @@ token_file="${token_dir}/known_tokens.csv"
create_accounts=($@)
touch "${token_file}"
if [ ! -e "${token_file}" ]; then
touch "${token_file}"
fi
for account in "${create_accounts[@]}"; do
if grep ",${account}," "${token_file}" ; then
continue

Loading…
Cancel
Save