Add menu
This commit is contained in:
parent
cfc3b5398d
commit
3b75c9ac12
@ -4,4 +4,6 @@
|
||||
|
||||
## Použití
|
||||
|
||||
iottadd.sh < -l | -r > < id > < pass >
|
||||
iottadd.sh < -l | -r > < id > < pass >
|
||||
- -l for usage on local machine
|
||||
- -r for usage on server (remote)
|
||||
|
25
iottadd.sh
Executable file
25
iottadd.sh
Executable 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
|
||||
|
Loading…
Reference in New Issue
Block a user