mirror of
https://github.com/jbowdre/phpipam-agent-docker.git
synced 2024-11-21 22:42:19 +00:00
double-quote to prevent globbing and word splitting
This commit is contained in:
parent
6705558e03
commit
d04faad09c
1 changed files with 33 additions and 0 deletions
33
entrypoint.sh
Normal file
33
entrypoint.sh
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$IPAM_SCAN_INTERVAL" in
|
||||||
|
5m) CRON_S="*/5 *"
|
||||||
|
;;
|
||||||
|
10m) CRON_S="*/10 *"
|
||||||
|
;;
|
||||||
|
15m) CRON_S="*/15 *"
|
||||||
|
;;
|
||||||
|
30m) CRON_S="*/30 *"
|
||||||
|
;;
|
||||||
|
1h) CRON_S="0 *"
|
||||||
|
;;
|
||||||
|
2h) CRON_S="0 */2"
|
||||||
|
;;
|
||||||
|
4h) CRON_S="0 */4"
|
||||||
|
;;
|
||||||
|
6h) CRON_S="0 */6"
|
||||||
|
;;
|
||||||
|
12h) CRON_S="0 */12"
|
||||||
|
;;
|
||||||
|
*) CRON_S="*/15 *"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "$CRON_S * * * /usr/local/bin/php /opt/phpipam-agent/index.php update > /proc/self/fd/1 2>/proc/self/fd/2" > $CRONTAB_FILE
|
||||||
|
echo "$CRON_S * * * /usr/local/bin/php /opt/phpipam-agent/index.php discover > /proc/self/fd/1 2>/proc/self/fd/2" >> $CRONTAB_FILE
|
||||||
|
chmod 0644 $CRONTAB_FILE
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue