fix http server doesn't start after the container restarted

This commit is contained in:
Terry Chen 2017-04-28 08:53:56 +08:00
parent ac8329fecd
commit a960c1840b
2 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,9 @@ docker run -d \
## Changelog
* 2017-04-28: version 0.1.1
* Fix http server doesn't start after the container restarted
* 2017-04-27: version 0.1
* Update base image to Ubuntu 16.04
* remove option `MIRROR_URL`

View File

@ -27,7 +27,6 @@ function create_link {
if [ ! -d /var/www/package ]; then
mkdir -p /var/www/package
sed -i '12s|DocumentRoot /var/www/html|DocumentRoot /var/www/package|' /etc/apache2/sites-enabled/000-default.conf
service apache2 restart >/dev/null
# If user doesn't provide mirror.list, using default setting
if [ ! -e /etc/apt/mirror.list ]; then
@ -37,6 +36,9 @@ if [ ! -d /var/www/package ]; then
create_link
fi
echo "[$(date)] Starting apache server"
service apache2 start
while true; do
echo "[$(date)] Starting apt-mirror"
apt-mirror