-
Notifications
You must be signed in to change notification settings - Fork 24
/
cli.tmpl
26 lines (23 loc) · 848 Bytes
/
cli.tmpl
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
#!/bin/bash
if [ -n \$1 -o x\$1 == x ] ; then
SERVER_LIST=\$1
else
SERVER_LIST=\${SERVER_LIST:="127.0.0.1:2181"}
echo "Server(s) not specified, using \${SERVER_LIST}"
fi
CLIENT_JVMFLAGS=""
#if $sasl
CLIENT_JVMFLAGS="\${CLIENT_JVMFLAGS} -Djava.security.auth.login.config=/path/to/client.conf"
#end if
#if $ssl
CLIENT_JVMFLAGS="\${CLIENT_JVMFLAGS} \
-Dzookeeper.clientCnxnSocket=org.apache.zookeeper.ClientCnxnSocketNetty \
-Dzookeeper.client.secure=true \
-Dzookeeper.ssl.keyStore.location=/path/to/keystore.jks \
-Dzookeeper.ssl.keyStore.password=password \
-Dzookeeper.ssl.trustStore.location=/path/to/truststore.jks \
-Dzookeeper.ssl.trustStore.password=password"
#end if
java -cp ./*:. \
\$CLIENT_JVMFLAGS \
org.apache.zookeeper.ZooKeeperMain -server "\${SERVER_LIST}"