Skip to content

Commit 20cb068

Browse files
author
Hans Höchtl
committed
fix alpine cron and httpd
1 parent 015d154 commit 20cb068

File tree

11 files changed

+36
-16
lines changed

11 files changed

+36
-16
lines changed

conf/provision.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ provision:
4747
apache/centos : centos-*
4848
apache/alpine : alpine
4949
php-apache/general: '*'
50+
php-apache/alpine : '*-alpine'
5051
php-nginx:
5152
configuration:
5253
nginx/general : '*'

docker/php-apache/7.1-alpine/conf/bin/service.d/httpd.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
88
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
99

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

13-
source /etc/apache2/envvars
14-
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
13+
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS

docker/php-apache/7.2-alpine/conf/bin/service.d/httpd.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
88
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
99

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

13-
source /etc/apache2/envvars
14-
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
13+
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS

docker/php-apache/7.3-alpine/conf/bin/service.d/httpd.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
88
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
99

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

13-
source /etc/apache2/envvars
14-
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
13+
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS

docker/php-apache/7.4-alpine/conf/bin/service.d/httpd.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ source /opt/docker/bin/config.sh
88
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
99

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

13-
source /etc/apache2/envvars
14-
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR $SERVICE_APACHE_OPTS
13+
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS

docker/php-official/7.1-alpine/conf/bin/service.d/cron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh
77

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

10-
exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
10+
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS

docker/php-official/7.2-alpine/conf/bin/service.d/cron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh
77

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

10-
exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
10+
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS

docker/php-official/7.3-alpine/conf/bin/service.d/cron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh
77

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

10-
exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
10+
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS

docker/php-official/7.4-alpine/conf/bin/service.d/cron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ source /opt/docker/bin/config.sh
77

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

10-
exec /usr/sbin/cron -f $SERVICE_CRON_OPTS
10+
exec /usr/sbin/crond -f $SERVICE_CRON_OPTS
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
# Init vars
4+
if [[ -z "$SERVICE_APACHE_OPTS" ]]; then SERVICE_APACHE_OPTS=""; fi
5+
6+
source /opt/docker/bin/config.sh
7+
8+
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
9+
10+
# Apache gets grumpy about PID files pre-existing
11+
rm -f /var/run/httpd/httpd.pid
12+
13+
exec /usr/sbin/apachectl -DFOREGROUND $SERVICE_APACHE_OPTS

0 commit comments

Comments
 (0)