8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 15:12:25 +00:00

Utilise des fichiers de requirements

This commit is contained in:
Maël Kervella 2018-05-21 14:48:58 +00:00
parent afbcb751e6
commit 7ddedcb48f
3 changed files with 27 additions and 22 deletions

16
apt_requirements.txt Normal file
View file

@ -0,0 +1,16 @@
python3-django
python3-dateutil
texlive-latex-base
texlive-fonts-recommended
python3-djangorestframework
python3-django-reversion
python3-pip
libsasl2-dev libldap2-dev
libssl-dev
python3-crypto
python3-git
javascript-common
libjs-jquery
libjs-jquery-ui
libjs-jquery-timepicker
libjs-bootstrap

View file

@ -3,6 +3,12 @@
SETTINGS_LOCAL_FILE='re2o/settings_local.py' SETTINGS_LOCAL_FILE='re2o/settings_local.py'
SETTINGS_EXAMPLE_FILE='re2o/settings_local.example.py' SETTINGS_EXAMPLE_FILE='re2o/settings_local.example.py'
APT_REQ_FILE="apt_requirements.txt"
PIP_REQ_FILE="pip_requirements.txt"
LDIF_DB_FILE="install_utils/db.ldiff"
LDIF_SCHEMA_FILE="install_utils/schema.ldiff"
VALUE= # global value used to return values by some functions VALUE= # global value used to return values by some functions
@ -61,24 +67,8 @@ install_requirements() {
### ###
echo "Setting up the required packages ..." echo "Setting up the required packages ..."
apt-get -y install \ cat $APT_REQ_FILE | xargs apt-get -y install
python3-django \ pip3 install -r $PIP_REQ_FILE
python3-dateutil \
texlive-latex-base \
texlive-fonts-recommended \
python3-djangorestframework \
python3-django-reversion \
python3-pip \
libsasl2-dev libldap2-dev \
libssl-dev \
python3-crypto \
python3-git \
javascript-common \
libjs-jquery \
libjs-jquery-ui \
libjs-jquery-timepicker \
libjs-bootstrap
pip3 install django-bootstrap3 django-ldapdb==0.9.0 django-macaddress
echo "Setting up the required packages: Done" echo "Setting up the required packages: Done"
} }
@ -194,8 +184,8 @@ install_ldap() {
echo "Hash of the password: $hashed_ldap_passwd" echo "Hash of the password: $hashed_ldap_passwd"
echo "Building the LDAP config files ..." echo "Building the LDAP config files ..."
sed 's|dc=example,dc=net|'"$domain"'|g' install_utils/db.ldiff | sed 's|FILL_IT|'"$hashed_ldap_passwd"'|g' > /tmp/db sed 's|dc=example,dc=net|'"$domain"'|g' $LDIF_DB_FILE | sed 's|FILL_IT|'"$hashed_ldap_passwd"'|g' > /tmp/db
sed 's|dc=example,dc=net|'"$domain"'|g' install_utils/schema.ldiff | sed 's|FILL_IT|'"$hashed_ldap_passwd"'|g' > /tmp/schema sed 's|dc=example,dc=net|'"$domain"'|g' $LDIF_SCHEMA_FILE | sed 's|FILL_IT|'"$hashed_ldap_passwd"'|g' > /tmp/schema
echo "Building the LDAP config files: Done" echo "Building the LDAP config files: Done"
echo "Stopping slapd service ..." echo "Stopping slapd service ..."

View file

@ -1,4 +1,3 @@
django-bootstrap3 django-bootstrap3
django-ldapdb==0.9.0
django-macaddress django-macaddress
python-dateutil
pycrypto