File otobo.service.helper.sh of Package otobo
#!/bin/bash
#
# Copyright (c) 2021 Scorpio IT, Deidesheim, Germany
# All rights reserved
#
# Author: Christian Wittmer <rpm@scorpio-it.net>
#
export LANG=POSIX
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
# Check for existence of needed config file and read it
OTOBO_SYSCONFIG=/etc/sysconfig/otobo
test -r $OTOBO_SYSCONFIG || { echo "$OTOBO_SYSCONFIG does not exist";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
# Read config
. $OTOBO_SYSCONFIG
# --
# prepare cron stuff
# --
if test $OTOBO_CRON_RUNNING -gt 0; then
if [[ -d $OTOBO_CRON_DIR ]]; then
cd $OTOBO_CRON_DIR
/bin/ls * | /usr/bin/grep -v '.dist' | /usr/bin/grep -v '.save' | /usr/bin/grep -v 'CVS' | /usr/bin/grep -v '.rpm' | \
/usr/bin/xargs cat > $OTOBO_CRON_TMP_FILE
fi
fi