Clean up when not needed

This commit is contained in:
Janis Jansons 2023-07-06 02:47:30 +03:00
parent 22d503d390
commit 7e6acc7a89

View File

@ -67,7 +67,7 @@ LOGIN=""
cat /run/oc-secret/password > /run/oc-secret/login && echo -e "\n$TOTP" >> /run/oc-secret/login
rm /run/oc-secret/password
rm /run/oc-secret/seed
LOGIN='find /run/oc-secret/login -exec cat {} \; -exec rm {} \;'
LOGIN='find /run/oc-secret/login -exec cat {} \; -exec rm {} \; -exec umount /run/oc-secret \;'
else
TOTP=$(oathtool --totp=sha1 -b "$SEED")
LOGIN='echo -e "$PASSWORD\n$TOTP'