-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed crontab and logging bug in docker
- Loading branch information
Showing
4 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Cron tab for phpredmin to collect redis statistics | ||
* * * * * root cd /var/www/html/phpredmin/public && /usr/local/bin/php index.php cron/index | ||
* * * * * root . /root/.profile; cd /var/www/html/phpredmin/public && /usr/local/bin/php index.php cron/index > /dev/stdout 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
variables_order = "EGPCS" | ||
log_errors = On | ||
error_log = /dev/stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#! /bin/sh | ||
|
||
# Copy PHPREDMIN env variables to .profile for cron jobs | ||
printenv | grep PHPREDMIN | xargs -rl echo "export$1" >> $HOME/.profile | ||
|
||
# Run gearman job server | ||
gearmand -d | ||
# Run cron daemon | ||
cron | ||
# Run gearman work | ||
php index.php gearman/index & | ||
# Start web server | ||
apache2-foreground & | ||
|
||
# Trap sigkill | ||
trap "pkill gearmand && pkill -WINCH apache2" TERM | ||
|
||
wait | ||
# Run gearman work & Start web server | ||
php index.php gearman/index & apache2-foreground |