3 : ${GIGI_CONF_DIR:=/etc/wpia/gigi}
5 [ -r "$GIGI_CONF_DIR/launcher.conf" ] && . "$GIGI_CONF_DIR/launcher.conf"
7 # assign default values
9 ${JDBC_DRIVER:=/usr/share/java/postgresql-jdbc4.jar} \
10 ${DNSJAVA:=/usr/share/java/dnsjava.jar} \
11 ${GIGI_EXEC:=/usr/share/java/gigi.jar} \
12 ${GIGI_DATA_DIR:=/var/lib/wpia-gigi}
16 printf >&2 'Could not %s.\n' "$1"
21 cd "$GIGI_DATA_DIR" || die 'move to data directory'
30 exec java $java_opts -cp "$JDBC_DRIVER:$DNSJAVA:$GIGI_EXEC" club.wpia.gigi.$class "$@"
36 start) runGigiClass Launcher ;;
37 debug) runGigiClass Launcher "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" ;;
39 exec 3</etc/gigi/conf.tar || die 'open config'
40 exec 4>>/var/log/wpia-gigi.log || die 'open log'
41 runGigiClass Launcher <&3 >&4 2>&1 &
42 echo $! > /var/run/wpia-gigi.pid
44 signer) runGigiClass util.SimpleSigner ;;
45 reset-database) runGigiClass util.DatabaseManager ;;
46 fetch-alexa) runGigiClass util.HighFinancialValueFetcher "" "$@" ;;
47 fetch-locales) runGigiClass util.FetchLocales "" "$@" ;;
49 mkdir -p "$GIGI_DATA_DIR/config" || die 'create config directory'
50 cd "$GIGI_DATA_DIR/config" || die 'move to config directory'
55 Usage: gigi COMMAND [ARGUMENT...]
59 debug - start gigi in debug mode (on port 8000, with config from stdin)
60 start-daemon - start gigi in background (using config from /etc/gig/config.tar)
61 signer - start the simple signer
62 signer-conf - extract config for simple signer (and reset-database) from the tar from stdin
63 reset-database - reset the database
64 fetch-alexa - fetch domains with high financial value from Alexa top 1 million list; required argument: target file, optional argument: number of domains to save
65 fetch-locales - fetch the localisation; optional argument: URL pattern to indicate download location