ADD: Add gigi start script
authorJanis Streib <janis@dogcraft.de>
Thu, 25 Sep 2014 00:33:18 +0000 (02:33 +0200)
committerJanis Streib <janis@dogcraft.de>
Wed, 31 Dec 2014 01:35:39 +0000 (02:35 +0100)
doc/scripts/gigi [new file with mode: 0755]

diff --git a/doc/scripts/gigi b/doc/scripts/gigi
new file mode 100755 (executable)
index 0000000..7fb7411
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+if [ "$JDBC_DRIVER" == "" ]
+then
+JDBC_DRIVER=/usr/share/java/mysql-connector-java.jar
+#echo "JDBC_DRIVER environment variable not set. Assumed path: $JDBC_DRIVER"
+fi
+if [ "$GIGI_EXEC" == "" ]
+then
+GIGI_EXEC=/usr/share/java/gigi.jar
+#echo "GIGI_EXEC environment variable not set. Assumed path: $GIGI_EXEC" 
+fi
+
+if [ "$1" == "start" ] 
+then
+       java -cp $JDBC_DRIVER:$GIGI_EXEC org.cacert.gigi.Launcher 
+elif [ "$1" == "signer" ] 
+then
+       java -cp $JDBC_DRIVER:$GIGI_EXEC org.cacert.gigi.util.SimpleSigner  
+elif [ "$1" == "reset-database" ] 
+then
+        java -cp $JDBC_DRIVER:$GIGI_EXEC org.cacert.gigi.util.DatabaseManager 
+elif [ "$1" == "fetch-locales" ] 
+then
+       java -cp $JDBC_DRIVER:$GIGI_EXEC org.cacert.gigi.util.FetchLocales
+else
+ echo "Usage: gigi <option>"
+echo "start - starts gigi"
+echo "signer - starts the simple signer"
+echo "reset-database - resets the database"
+echo "fetch-locales - (re)fetch the localisation"
+fi