hello
is there a way to execute via shell
openssl speed
thanks
hello
is there a way to execute via shell
openssl speed
thanks
If you want to do this automatically (and don’t care about the command’s output), use a shell command.
However, if it’s just a one-off thing, I’d recommend just connecting to your system with ssh
and running it manually. The exact way to do this depends on how you installed Home Assistant (e.g. Container or Operating System).
If you do care about the command’s output and want to run it regularly, use a command line sensor.
manually,
but its not there >
[core-ssh ~]$ openssl
-bash: openssl: command not found
What exactly are you connecting to with ssh
? openssl
should be available inside the homeassistant
container.
ssh ip address of ha; its running on rpi4 installed on sd card
I assume that is Home Assistant OS with the SSH addon.
I don’t think that’ll let you manage other containers (but try that first, it is the easiest way if it works). You might need to connect like this Debugging the Home Assistant Operating System | Home Assistant Developer Docs
To enter the homeassistant
container:
docker exec -it homeassistant /bin/bash
Just figured that the latest (2022.8.6) container does not have openssl command available anymore.
Anyone any idea why it was removed?
user@Docker:/pwd/config/ssl% sudo docker ps | grep home
Password:
fb0072b6e45d homeassistant/home-assistant:2022.8.6 "/init" 10 minutes ago Up 10 minutes home-assistant
dmircea@Docker:/pwd/config/ssl% sudo docker exec -it -u 0 fb0 bash
bash-5.1# find / -name openssl
/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl
/usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl
bash-5.1#
Just discovered the same issue. I have automations that regenerate PFX files from Lets Encrypt certs in Traefik and without this I’m now getting invalid certificate issues.
In my Docker environment I’ve added the following to the start of the script:
#Get openssl if not installed
if ! [ -x "$(command -v openssl)" ];
then
echo "OpenSSL could not be found, installing"
apk add openssl -f
fi
Any idea anyone why openssl was removed from the container?
It is super annoying that I have to install it everytime I’m upgrading the container.
Hi @BeastleeUK,
You seemed to have cracked this nut.
Can you please explain a bit more precisely where exactly you are running the script lines from above?
My environment is a Synology NAS and I would like to avoid rebuilding the container image if possible. Changing the entrypoint or just the command is probably the way to run something before the start but then I will need to add a script somewhere on the volumes and hook that one in front of the normal stuff. That is probably going to require maintenance in the future if HA is changing the way the entrypoint works (right now I see it is running /init
script).
Thank you