Remove GPG stuff from run.sh as installer does it

Steven 2021-03-10 09:11:54 +01:00
parent a284fdcdde
commit e549511553
1 changed files with 0 additions and 22 deletions

View File

@ -107,28 +107,6 @@ if [ -r /.firstboot.tmp ]; then
#Redis should not run as a daemon
sed -i "s/daemonize yes/daemonize no/g" /etc/redis/redis.conf
# Generate the admin user PGP key
echo "Creating admin GnuPG key"
if [ -z "$MISP_ADMIN_EMAIL" -o -z "$MISP_ADMIN_PASSPHRASE" ]; then
echo "No admin details provided, don't forget to generate the PGP key manually!"
else
echo "Generating admin PGP key ... (please be patient, we need some entropy)"
cat >/tmp/gpg.tmp <<GPGEOF
%echo Generating a basic OpenPGP key
Key-Type: RSA
Key-Length: 2048
Name-Real: MISP Admin
Name-Email: $MISP_ADMIN_EMAIL
Expire-Date: 0
Passphrase: $MISP_ADMIN_PASSPHRASE
%commit
%echo Done
GPGEOF
sudo -u www-data gpg --homedir /var/www/MISP/.gnupg --gen-key --batch /tmp/gpg.tmp >>/tmp/install.log
rm -f /tmp/gpg.tmp
sudo -u www-data gpg --homedir /var/www/MISP/.gnupg --export --armor $MISP_ADMIN_EMAIL > /var/www/MISP/app/webroot/gpg.asc
fi
# Display tips
cat <<__WELCOME__