mirror of
https://git.freebsd.org/ports.git
synced 2025-07-15 08:19:13 -04:00
Update to 1.8.1: - Add additional patches issued post-release - Stage support - Removed option for MySQL patch now contained in the release - Fix ./mage command by adding zlib to dependencies - Closes ports/187985 (commit of 1.7 was incomplete) - Adds option to support the REST Api. - Adds option to activate redis session module (disabled by default). - Rework cron.sh to do sane locking with lockf(1) - Add example cron entry PR: ports/188901 Submitted by: Melvyn Sopacua (maintainer) Approved by: maintainer (implicit), jadawin (mentor)
27 lines
556 B
Bash
27 lines
556 B
Bash
#!/bin/sh
|
|
|
|
# Run this script if specified
|
|
if [ $# -gt 0 ]
|
|
then
|
|
CRONSCRIPT=$1
|
|
shift
|
|
else
|
|
CRONSCRIPT=cron.php
|
|
fi
|
|
# Pass argument on to cron.php
|
|
MODE=""
|
|
if [ $# -gt 0 ]
|
|
then
|
|
MODE="$1"
|
|
shift
|
|
fi
|
|
# PHP cli
|
|
PHP_BIN=`which php 2>/dev/null||echo %%PREFIX%%/bin/php`
|
|
|
|
# absolute path to magento installation
|
|
INSTALLDIR=`dirname $(realpath $0)`
|
|
|
|
# Only run if we're the only one running
|
|
[ -d ${INSTALLDIR}/var/locks ] || mkdir -p -m 777 ${INSTALLDIR}/var/locks
|
|
lockf -s -t 0 ${INSTALLDIR}/var/locks/cron.lock \
|
|
${PHP_BIN} -f ${INSTALLDIR}/${CRONSCRIPT} ${MODE}
|