eole-lemur/posttemplate/03-lemur

22 lines
942 B
Bash
Executable File

#!/bin/bash
set -e
# install unrelease python modules
pip3 install alembic-autogenerate-enums==0.0.2 asyncpool==1.0 certsrv==2.1.1 cryptography==3.1.1 dnspython3==1.15.0 dyn==1.8.1 flask-replicated==1.4 javaobj-py3==0.4.0.1 jsonlines==1.2.0 logmatic-python==0.1.7 marshmallow==2.20.4 pycryptodomex==3.9.7 pyjks==20.0.0 raven[flask]==6.10.0 twofish==0.3.0 pyjwt==2.1.0
mkdir -p /var/log/lemur/
chown lemur: /var/log/lemur/
# EOLE-DB change file right to 400
chmod 640 /etc/lemur/*
chgrp lemur /etc/lemur/*
systemctl start postgresql.service
psql -Upostgres -c "grant all on all tables in schema public to lemur" lemur
psql -Upostgres -c "grant all on all sequences in schema public to lemur" lemur
psql -Upostgres -c "grant all on all functions in schema public to lemur" lemur
su - lemur -s /bin/bash -c "lemur --config=/etc/lemur/lemur.conf.py init --password $(CreoleGet lemur_admin_password)"
systemctl stop postgresql.service
exit 0