diff --git a/global/overlay/etc/cron.d/cosmos b/global/overlay/etc/cron.d/cosmos index 38d14f5..e7abc17 100644 --- a/global/overlay/etc/cron.d/cosmos +++ b/global/overlay/etc/cron.d/cosmos @@ -1,4 +1,4 @@ SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -*/15 * * * * root test -f /etc/no-automatic-cosmos || /usr/local/libexec/cosmos-cron-wrapper +*/15 * * * * root /usr/local/libexec/cosmos-cron-wrapper diff --git a/global/overlay/usr/local/libexec/cosmos-cron-wrapper b/global/overlay/usr/local/libexec/cosmos-cron-wrapper index 2df85b5..ae66810 100755 --- a/global/overlay/usr/local/libexec/cosmos-cron-wrapper +++ b/global/overlay/usr/local/libexec/cosmos-cron-wrapper @@ -1,10 +1,12 @@ #!/usr/bin/env bash -RUN_COSMOS=/usr/local/bin/run-cosmos +test -f /etc/no-automatic-cosmos && exit 0 + +RUN_COSMOS='/usr/local/bin/run-cosmos' SCRIPTHERDER_CMD='' -if [ -f /usr/local/bin/scriptherder ]; then +if [ -x /usr/local/bin/scriptherder ]; then SCRIPTHERDER_CMD='/usr/local/bin/scriptherder --mode wrap --syslog --name cosmos --' fi -${SCRIPTHERDER_CMD} ${RUN_COSMOS} +exec ${SCRIPTHERDER_CMD} ${RUN_COSMOS} "$@"