Added api.keys automation to script

This commit is contained in:
Julian Hahn 2026-04-22 11:40:43 +02:00
parent d45a096da2
commit 3eb0debe24
1 changed files with 11 additions and 2 deletions

View File

@ -4,8 +4,17 @@ USER=$(whoami)
file_path="/home/$USER/Dokumente/api.keys"
if ! test -f $file_path; then
echo "Keine API Keys gefunden. Bitte eine 'api.keys' Datei in /home/$USER/Dokumente/ ablegen"
exit 1
echo "Keine API Keys gefunden. Im Folgenden wird 'api.keys' Datei in /home/$USER/Dokumente/ abgelegt"
/usr/bin/touch /home/$USER/Dokumente/api.keys
/usr/bin/chown $USER:$USER /home/$USER/Dokumente/api.keys
MORE="y"
while [ $MORE == "y" ]; do
read -p "Bitte API Key eingeben: " API
API=${API:-}
echo $API >> /tmp/api.keys
read -p "Weitere API Keys eingeben? [y/N] " MORE
MORE=${MORE:-N}
done
fi
#/usr/bin/rm -f /home/$USER/Dokumente/api.keys 2>&1 >/dev/null