Skip to content

Commit a5565ac

Browse files
committed
Made the docker container syslog start less noisy. Refined the virtualenv requirements installation to test for an existing django properly, and use the repository requirements file if available.
- Legacy-Id: 18258
1 parent 6bfea68 commit a5565ac

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

docker/docker-init.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ if ! /etc/init.d/mysql status; then
3838
/etc/init.d/mysql start
3939
fi
4040

41-
echo "Checking if syslog is running ..."
42-
if ! /etc/init.d/rsyslog status; then
43-
echo "Starting syslog ..."
41+
echo "Checking if syslogd is running ..."
42+
if ! /etc/init.d/rsyslog status > /dev/null; then
43+
echo "Starting syslogd ..."
4444
/etc/init.d/rsyslog start
4545
fi
4646

@@ -106,12 +106,20 @@ fi
106106
echo "Activating the virtual python environment ..."
107107
. $VIRTDIR/bin/activate
108108

109-
if ! python -c "import django"; then
109+
110+
if ! $VIRTDIR/bin/python -c "import django"; then
110111
echo "Installing requirements ..."
111-
pip install -r /usr/local/share/datatracker/requirements.txt
112+
if [ ! -f /home/$USER/$CWD/requirements.txt ]; then
113+
echo " Using /home/$USER/$CWD/requirements.txt"
114+
pip install -r /home/$USER/$CWD/requirements.txt
115+
else
116+
echo " Didn't find /home/$USER/$CWD/requirements.txt"
117+
echo " Using /usr/local/share/datatracker/requirements.txt"
118+
pip install -r /usr/local/share/datatracker/requirements.txt
119+
fi
112120
fi
113121

114-
if [ ! -f $CWD/ietf/settings_local.py ]; then
122+
if [ ! -f /home/$USER/$CWD/ietf/settings_local.py ]; then
115123
echo "Setting up a default settings_local.py ..."
116124
cp /home/$USER/$CWD/docker/settings_local.py /home/$USER/$CWD/ietf/settings_local.py
117125
fi

0 commit comments

Comments
 (0)