add cron dbp script

This commit is contained in:
Mario Fetka 2023-01-08 12:11:41 +01:00
parent 7ab42ae32e
commit 8acc378903

View File

@ -1,30 +1,23 @@
#!/bin/bash #!/bin/bash
while getopts ':f:h' opt; do usage() { echo "Usage: $0 [-f dbp.ini]" 1>&2; exit 1; }
case "$opt" in
f)
INIFILE="$OPTARG"
;;
h) while getopts ":f:" o; do
echo "Usage: $(basename $0) [-f dbp.ini]" case "${o}" in
exit 0 f)
;; INIFILE=${OPTARG}
*)
:) usage
echo -e "option requires an argument.\nUsage: $(basename $0) [-f dbp.ini]" ;;
exit 1 esac
;;
?)
echo -e "Invalid command option.\nUsage: $(basename $0) [-f dpb.ini]"
exit 1
;;
esac
done done
shift "$(($OPTIND -1))" shift $((OPTIND-1))
MYSTIC_DIR=`${MYSTIC_DIR}/inimod r ${INIFILE} -S GeneralDbP -k BaseDir --silent` if [ -z "${f}" ]; then
usage
fi
MYSTIC_DIR="@MYSTIC_DIR@"
TMP_DIR=$(mktemp -d) TMP_DIR=$(mktemp -d)
MIS_ENABLE=`${MYSTIC_DIR}/inimod r ${INIFILE} -S GeneralDbP -k MisLog --silent` MIS_ENABLE=`${MYSTIC_DIR}/inimod r ${INIFILE} -S GeneralDbP -k MisLog --silent`