phpipam-agent-docker/entrypoint.sh

13 lines
374 B
Bash
Raw Normal View History

2020-10-30 08:43:41 +00:00
#!/bin/sh
2020-10-29 17:09:23 +00:00
set -e
2020-10-30 14:56:11 +00:00
[ -z "$CRON_SCHEDULE" ] && CRON_SCHEDULE="1/15 * * * *"
2020-10-29 17:15:52 +00:00
echo "$CRON_SCHEDULE /usr/local/bin/php /opt/phpipam-agent/index.php update > /proc/self/fd/1 2>/proc/self/fd/2" > $CRONTAB_FILE
2020-10-30 14:16:02 +00:00
echo "$CRON_SCHEDULE /usr/local/bin/php /opt/phpipam-agent/index.php discover > /proc/self/fd/1 2>/proc/self/fd/2" >> $CRONTAB_FILE
2020-10-29 17:09:23 +00:00
chmod 0644 $CRONTAB_FILE
exec "$@"