maj script cron paheko
This commit is contained in:
parent
dfbc908d9a
commit
ae91762502
@ -15,8 +15,8 @@ RUN mkdir ${PAHEKO_DIR}/data/plugins/facturation && tar zxvf ${PAHEKO_DIR}/data/
|
||||
#install cron pour factory_cron.sh
|
||||
RUN apt-get update && apt-get install cron joe rsyslog -y
|
||||
RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
|
||||
RUN echo "0 1 * * * cd ${PAHEKO_DIR} && ${PAHEKO_DIR}/factory_cron.sh" >> /var/spool/cron/crontabs/root
|
||||
RUN echo "* * * * * cd ${PAHEKO_DIR} && ${PAHEKO_DIR}/factory_cron_emails.sh" >> /var/spool/cron/crontabs/root
|
||||
RUN echo "0 1 * * * cd ${PAHEKO_DIR} && ${PAHEKO_DIR}/factory_cron.sh 1> /dev/null 2> /dev/null" >> /var/spool/cron/crontabs/root
|
||||
RUN echo "* * * * * cd ${PAHEKO_DIR} && ${PAHEKO_DIR}/factory_cron_emails.sh 1> /dev/null 2> /dev/null" >> /var/spool/cron/crontabs/root
|
||||
RUN chmod 600 /var/spool/cron/crontabs/root
|
||||
RUN sed -i "/exec/i\service cron start\n" /usr/local/bin/docker-php-entrypoint
|
||||
RUN ln -sf /usr/local/bin/php /usr/bin/
|
||||
|
@ -7,7 +7,8 @@ FACTORY_USER_DIRECTORY="users"
|
||||
# Chemin vers le script cron.php de Paheko
|
||||
PAHEKO_CRON_SCRIPT="scripts/cron.php"
|
||||
|
||||
cd /usr/share/paheko
|
||||
#cd /usr/share/paheko
|
||||
cd /var/www/paheko
|
||||
|
||||
for user in $(cd ${FACTORY_USER_DIRECTORY} && ls -1d */)
|
||||
do
|
||||
|
@ -7,6 +7,9 @@ FACTORY_USER_DIRECTORY="users"
|
||||
# Chemin vers le script emails.php de Paheko
|
||||
PAHEKO_CRON_SCRIPT="scripts/emails.php"
|
||||
|
||||
#cd /usr/share/paheko
|
||||
cd /var/www/paheko
|
||||
|
||||
for user in $(cd ${FACTORY_USER_DIRECTORY} && ls -1d */)
|
||||
do
|
||||
PAHEKO_FACTORY_USER=$(basename "$user") /usr/bin/php $PAHEKO_CRON_SCRIPT
|
||||
|
Loading…
Reference in New Issue
Block a user