3 : ${GIGI_CONF_DIR:=/etc/cacert/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 ${GIGI_EXEC:=/usr/share/java/gigi.jar} \
11 ${GIGI_DATA_DIR:=/var/lib/cacert-gigi}
15 printf >&2 'Could not %s.\n' "$1"
20 cd "$GIGI_DATA_DIR" || die 'move to data directory'
29 exec java $java_opts -cp "$JDBC_DRIVER:$GIGI_EXEC" org.cacert.gigi.$class "$@"
35 start) runGigiClass Launcher ;;
36 debug) runGigiClass Launcher "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" ;;
38 exec 3</etc/cacert/gigi/conf.tar || die 'open config'
39 exec 4>>/var/log/cacert-gigi.log || die 'open log'
40 runGigiClass Launcher <&3 >&4 2>&1 &
41 echo $! > /var/run/cacert-gigi.pid
43 signer) runGigiClass util.SimpleSigner ;;
44 reset-database) runGigiClass util.DatabaseManager ;;
45 fetch-alexa) runGigiClass util.HighFinancialValueFetcher "" "$@" ;;
46 fetch-locales) runGigiClass util.FetchLocales "" "$@" ;;
48 mkdir -p "$GIGI_DATA_DIR/config" || die 'create config directory'
49 cd "$GIGI_DATA_DIR/config" || die 'move to config directory'
54 Usage: gigi COMMAND [ARGUMENT...]
58 debug - start gigi in debug mode (on port 8000, with config from stdin)
59 start-daemon - start gigi in background (using config from /etc/cacert/gig/config.tar)
60 signer - start the simple signer
61 signer-conf - extract config for simple signer (and reset-database) from the tar from stdin
62 reset-database - reset the database
63 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
64 fetch-locales - fetch the localisation; optional argument: URL pattern to indicate download location