Branch: Tag:

2004-10-23

2004-10-23 22:58:14 by Peter Bortas <zino@lysator.liu.se>

Fixed argument parser and added --database.

Rev: aido-metaserver.in:1.2

11:   fi      DB='"mysql://root@localhost/aido_md"' - DEFINES="-V7.4 -DSQL_URL=$DB" + DEFINES="-V7.4"   ARGS=""   once=0   
49:    echo "AIDO MetaServer $VERSION"    exit 0    ;; -  '--log=*') +  --log=*)    LOG=`echo $1 | sed -e 's/--log=//'`    ;; -  '--pid-file=*') +  --pid-file=*)    PIDFILE=`echo $1 | sed -e 's/--pid-file=//'`    ;; -  +  --database=*) +  DB=`echo $1 | sed -e 's/--database=//'` +  ;;    '--help'|'-?')    sed -e "s/\\.B/`tput 'bold' 2>/dev/null`/g" -e "s/B\\./`tput 'sgr0' 2>/dev/null`/g" << EOF   This command will start the AIDO MetaServer (version $VERSION).
73:    default is $DEFLOG    .B--pid-file=fileB.: Use the specified file as the PID file.    default is $DEFPIDFILE -  +  .B--database=URLB.: Use specified database URL. +  default is $DB   EOF    tput 'rmso' 2>/dev/null    exit 0
86:   done      cd "@DIR@/programs" - ARGS="$DEFINES -M../pike-modules metaserver.pike $ARGS" + ARGS="$DEFINES -DSQL_URL="'"'"$DB"'"'" -M../pike-modules metaserver.pike $ARGS"      rotate_log() {    mv -f "$LOG.old" "$LOG.older" 2>/dev/null