2022-02-23 14:42:32 +00:00
|
|
|
get_stack () {
|
|
|
|
if [[ ! -z $1 && $1 == "wc" ]];then
|
|
|
|
ls /opt/nodemecu/stack | wc -l
|
|
|
|
else
|
|
|
|
ls /opt/nodemecu/stack | tail -1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2022-03-03 19:34:32 +00:00
|
|
|
# Generar una llave privada ECDSA si no existe
|
|
|
|
generate_private_key () {
|
|
|
|
test -f "$private_key" && return 1
|
2022-02-23 14:42:32 +00:00
|
|
|
|
2022-03-03 19:34:32 +00:00
|
|
|
ssh-keygen -t ecdsa -f "$private_key" -N "" -m PEM
|
|
|
|
}
|