icp/dev/run-internal.sh

17 lines
416 B
Bash
Raw Normal View History

2018-05-05 20:56:32 +00:00
#!/bin/bash -e
2018-05-05 20:41:55 +00:00
adduser --system --no-create-home --home /data --uid 1000 www-user
sed -i "s/APACHE_RUN_USER=www-data/APACHE_RUN_USER=www-user/" /etc/apache2/envvars
/etc/init.d/apache2 start
tail -f /var/log/apache2/error.log &
2018-05-05 20:56:32 +00:00
V="/data/run/virtualenv"
if [[ ! -e $V ]] ; then
mkdir -p $V
virtualenv -p python3 $V
cd $V
source $V/bin/activate
pip3 install -U -r /data/dev/requirements.txt
fi
2018-05-05 20:41:55 +00:00
/bin/bash