This commit is contained in:
David Houdek 2023-10-09 22:21:11 +02:00
parent cfc3b5398d
commit 3b75c9ac12
2 changed files with 28 additions and 1 deletions

View File

@ -5,3 +5,5 @@
## Použití
iottadd.sh < -l | -r > < id > < pass >
- -l for usage on local machine
- -r for usage on server (remote)

25
iottadd.sh Executable file
View File

@ -0,0 +1,25 @@
GREEN="\033[1;32m"
RED="\033[1;31m"
PURPLE="\033[1;35m"
BLUE="\033[1;34m"
RESET="\033[0m"
if [[ $1 == "-l" ]]; then
# Used on local machine
echo -e $RED"Not implemented"$RESET
elif [[ $1 == "-r" ]]; then
# Used on server
echo -en $GREEN"Running with: ID="$BLUE$2$GREEN" and PASS="$BLUE$3"\nIs that ok? ["$GREEN"Y"$BLUE"/"$RED"n"$BLUE"]"$PURPLE
read -p " " confirmation
if [[ $confirmation == "n" ]]; then
exit 666
fi
else
echo -e $RED"Expected \"-l\" or \"-r\""$RESET
fi