I'm putting together a script to create certificates for my devices, I thought I'd use shelljs to run these commands. I created a basic command for certificate generation, but the script stops running when cmd has a question, as in the example:
const shell = require('shelljs')
shell.exec("openssl genrsa -out deviceCert.key 2048")
shell.exec("openssl req -new -key deviceCert.key -out deviceCert.csr")
I would like to know if there is any command that I can use to answer these cmd questions by shelljs itself.
Try something like this: