Hi together...
I've a Problem to execute some Commands from a Batch File.
I do start with...
Result...
Create private Server Key and Certificate Request...
./openssl.sh: line 31: sudo: command not found
Create self signed Certificate...
./openssl.sh: line 36: sudo: command not found
./openssl.sh: line 51: sleep: command not found
Result...
############################################################
###
### use... openssl.sh example.com (selfsigned)
### The Option 'selfsigned' will create a selsigned Certificate...
###
############################################################
./openssl.sh: line 51: sleep: command not found
openSSL is installed and if I execute it on Command Line, the it works.
The Right to upper Folder is 755 an the File is also 755.
Maybe is any one knowen this Problem?
I've a Problem to execute some Commands from a Batch File.
Bash:
#!/bin/bash
clear; echo; echo;
sleep 0.25;
DOMAIN="$1";
TYPE="selfsigned"
PATH="./traefik/data/certificates";
if ! [ -z "$DOMAIN" ]; then
echo "Create private Server Key and Certificate Request..."; echo;
sudo openssl req -nodes -new -newkey rsa:4096 -keyout $DOMAIN.key -sha256 -out $DOMAIN.csr -config ./cmd/data/openssl.cfg; echo;
#sudo openssl req -newkey rsa:4096 -sha256 -outform PEM -out server_256.csr -keyout server.key -keyform PEM -days 1825 -nodes;
if [ "$TYPE" = "selfsigned" ]; then
echo "Create self signed Certificate..."; echo;
sudo openssl x509 -req -days 1825 -sha256 -in $DOMAIN.csr -signkey $DOMAIN.key -out $DOMAIN.crt; echo;
fi;
else
echo "### use... openssl.sh example.com (selfsigned) ###";
echo "### The Option 'selfsigned' will create a selsigned Certificate... ###";
fi;
sleep 1.25;
I do start with...
Code:
sudo ./openssl.sh example.com
Result...
Create private Server Key and Certificate Request...
./openssl.sh: line 31: sudo: command not found
Create self signed Certificate...
./openssl.sh: line 36: sudo: command not found
./openssl.sh: line 51: sleep: command not found
Code:
sudo ./openssl.sh
############################################################
###
### use... openssl.sh example.com (selfsigned)
### The Option 'selfsigned' will create a selsigned Certificate...
###
############################################################
./openssl.sh: line 51: sleep: command not found
openSSL is installed and if I execute it on Command Line, the it works.
The Right to upper Folder is 755 an the File is also 755.
Maybe is any one knowen this Problem?
Last edited: