Wrap cosmos in scriptherder if available
nunoc-ops and others has been doing this for ages by just modifing the cron file.
This commit is contained in:
parent
3234cc59e3
commit
49ba964897
|
@ -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/bin/run-cosmos
|
||||
*/15 * * * * root test -f /etc/no-automatic-cosmos || /usr/local/libexec/cosmos-cron-wrapper
|
||||
|
|
10
global/overlay/usr/local/libexec/cosmos-cron-wrapper
Normal file
10
global/overlay/usr/local/libexec/cosmos-cron-wrapper
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
RUN_COSMOS=/usr/local/bin/run-cosmos
|
||||
SCRIPTHERDER_CMD=''
|
||||
|
||||
if [ -f /usr/local/bin/scriptherder ]; then
|
||||
SCRIPTHERDER_CMD='/usr/local/bin/scriptherder --mode wrap --syslog --name cosmos --'
|
||||
fi
|
||||
|
||||
${SCRIPTHERDER_CMD} ${RUN_COSMOS}
|
Loading…
Reference in a new issue