nineschool/src/nineschool-1.0/scripts/genkey.sh

13 lines
249 B
Bash
Raw Normal View History

2020-10-02 14:34:23 +02:00
#!/bin/bash
# Se positionner sur la racine du projet
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd ${DIR}
cd ..
DIR=$(pwd)/.key
# Génération d'une clé d'API
if [ ! -f $DIR ]; then
openssl rand -hex 32 > $DIR
fi