-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path2FA-Auth.sh
More file actions
executable file
·39 lines (31 loc) · 879 Bytes
/
2FA-Auth.sh
File metadata and controls
executable file
·39 lines (31 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
LibraryDir="$( dirname $0 )/library"
for Library in "backup" "essential" "gnupg-encryption" "menu" "system" "token"; do
if [[ -f ${LibraryDir}/${Library}.sh ]]; then
source ${LibraryDir}/${Library}.sh
else
echo "ERROR! The library '${Library}' is missing!"
echo "Check what happened with it!"
exit 1
fi
done
ConfigDir=".config/2fa-auth"
BackupFile="2fa-config-backup.tar"
ExportFile="2fa-tokens.txt"
InfoFile="$HOME/${ConfigDir}/2fa-auth.info"
TempFile="$HOME/${ConfigDir}/temp-tokens.txt"
TokenFile="$HOME/${ConfigDir}/2fa-tokens.gpg"
TokenFileTXT="$HOME/${ConfigDir}/2fa-tokens.txt"
VERSION="v3.2-0"
SystemCheck
if [[ -z $1 ]]; then
Usage
PressAnyKey
MainMenu
else
case ${1,,} in
changekey) ChangeMenu ;;
gencode) TokenGenerate ;;
*) Usage ;;
esac
fi