check for /etc/no-automatic-cosmos in the wrapper, and allow arguments to be passed

This commit is contained in:
Fredrik Thulin 2023-02-06 16:45:53 +01:00
parent 3988f5beb0
commit 79606f2a6d
No known key found for this signature in database
GPG key ID: 2707330D4030CCAD
2 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,4 @@
SHELL=/bin/sh SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 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

View file

@ -1,10 +1,12 @@
#!/usr/bin/env bash #!/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='' 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 --' SCRIPTHERDER_CMD='/usr/local/bin/scriptherder --mode wrap --syslog --name cosmos --'
fi fi
${SCRIPTHERDER_CMD} ${RUN_COSMOS} exec ${SCRIPTHERDER_CMD} ${RUN_COSMOS} "$@"