Skip to content

Commit

Permalink
fix alpine cron and httpd
Browse files Browse the repository at this point in the history
  • Loading branch information
htuscher committed Apr 13, 2020
1 parent 015d154 commit 20cb068
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 16 deletions.
1 change: 1 addition & 0 deletions conf/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ provision:
apache/centos : centos-*
apache/alpine : alpine
php-apache/general: '*'
php-apache/alpine : '*-alpine'
php-nginx:
configuration:
nginx/general : '*'
Expand Down
5 changes: 2 additions & 3 deletions docker/php-apache/7.1-alpine/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid
rm -f /var/run/httpd/httpd.pid

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS
5 changes: 2 additions & 3 deletions docker/php-apache/7.2-alpine/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid
rm -f /var/run/httpd/httpd.pid

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS
5 changes: 2 additions & 3 deletions docker/php-apache/7.3-alpine/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid
rm -f /var/run/httpd/httpd.pid

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS
5 changes: 2 additions & 3 deletions docker/php-apache/7.4-alpine/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid
rm -f /var/run/httpd/httpd.pid

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS
2 changes: 1 addition & 1 deletion docker/php-official/7.1-alpine/conf/bin/service.d/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/cron.d/"

exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS
2 changes: 1 addition & 1 deletion docker/php-official/7.2-alpine/conf/bin/service.d/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/cron.d/"

exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS
2 changes: 1 addition & 1 deletion docker/php-official/7.3-alpine/conf/bin/service.d/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/cron.d/"

exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS
2 changes: 1 addition & 1 deletion docker/php-official/7.4-alpine/conf/bin/service.d/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/cron.d/"

exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS
13 changes: 13 additions & 0 deletions provisioning/php-apache/alpine/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Init vars
if [[ -z "$SERVICE_APACHE_OPTS" ]]; then SERVICE_APACHE_OPTS=""; fi

source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/httpd/httpd.pid

exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS
10 changes: 10 additions & 0 deletions provisioning/php/official-alpine/bin/service.d/cron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# Init vars
if [[ -z "$SERVICE_CRON_OPTS" ]]; then SERVICE_CRON_OPTS=""; fi

source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/cron.d/"

exec /usr/sbin/crond -f $SERVICE_CRON_OPTS

0 comments on commit 20cb068

Please sign in to comment.