add cron dbp script
This commit is contained in:
parent
7ab42ae32e
commit
8acc378903
37
dbp/cron.sh
37
dbp/cron.sh
@ -1,30 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
while getopts ':f:h' opt; do
|
||||
case "$opt" in
|
||||
f)
|
||||
INIFILE="$OPTARG"
|
||||
;;
|
||||
usage() { echo "Usage: $0 [-f dbp.ini]" 1>&2; exit 1; }
|
||||
|
||||
h)
|
||||
echo "Usage: $(basename $0) [-f dbp.ini]"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
:)
|
||||
echo -e "option requires an argument.\nUsage: $(basename $0) [-f dbp.ini]"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
?)
|
||||
echo -e "Invalid command option.\nUsage: $(basename $0) [-f dpb.ini]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
while getopts ":f:" o; do
|
||||
case "${o}" in
|
||||
f)
|
||||
INIFILE=${OPTARG}
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
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)
|
||||
|
||||
MIS_ENABLE=`${MYSTIC_DIR}/inimod r ${INIFILE} -S GeneralDbP -k MisLog --silent`
|
||||
|
Loading…
Reference in New Issue
Block a user