1
0
Fork 0
scripts-admin-quickndirty-p.../openssl-little-CA/renommage.sh

15 lines
261 B
Bash
Executable file

#!/bin/sh
if [ -z "$1" ]; then
echo "ERREUR: 'faut fournir un nom"
exit 1
fi
for i in newcert.pem newkey.pem newcert.p12; do
if [ "$i" = "newkey.pem" ]; then
EXTENSION="key"
else
EXTENSION=$( echo $i | sed 's/.*\.//' )
fi
mv "$i" $1.$EXTENSION
done