maj script cron paheko

This commit is contained in:
HPL 2024-09-21 13:12:45 +02:00
parent dfbc908d9a
commit ae91762502
3 changed files with 7 additions and 3 deletions

View File

@ -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/

View File

@ -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

View File

@ -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