1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/bin/bash # # 3DS Server CLI tool script. usage() { cat <<EOF Usage: $0 < command > <argument> This script provided various tools related to the 3DS Server. COMMANDS: encrypt Encrypts the password given as an argument for use in the 3DS Server XML configuration EOF } if [[ ! $ # -eq 2 ]]; then usage exit 1 fi THREEDS_HOME=$( cd $( dirname "$0" )/..; pwd ) THREEDS_TOOL_JAR= "$THREEDS_HOME/lib/nca-3dss-cli-tool.jar" COMMAND=$1 ARGUMENT=$2 case $COMMAND in encrypt) java -jar $THREEDS_TOOL_JAR -$COMMAND $ARGUMENT ;; *) usage exit 1 ;; esac |