update
This commit is contained in:
@@ -41,27 +41,28 @@ function Usage {
|
||||
}
|
||||
|
||||
function ModifyConf {
|
||||
Print Modify server.properties ...
|
||||
Print Modifying server.properties ...
|
||||
local kv=
|
||||
local conf='conf/zoo.cfg'
|
||||
while read kv; do
|
||||
[ -z "$kv" ] && break
|
||||
Print Modify property: ${kv%%=*} ...
|
||||
Print Modifying property: ${kv%%=*} ...
|
||||
sed -i "/^${kv%%=*} *=/d" $conf
|
||||
echo "$kv" >> $conf
|
||||
done <<< "$(env | grep '^_CONF_' | sed 's/_CONF_//')"
|
||||
sed -i -e '/^dataDir/d' -e '/^dataLogDir/d' $conf
|
||||
echo -e 'dataDir=/opt/zk/data\ndataLogDir=/opt/zk/dataLog' >> $conf
|
||||
if [ ! -e data/myid ]; then
|
||||
Print Generate myid ...
|
||||
Print Generating myid ...
|
||||
echo $MYID > data/myid
|
||||
fi
|
||||
}
|
||||
|
||||
function StartProc {
|
||||
Print Start zookeeper ...
|
||||
Print Starting zookeeper ...
|
||||
./bin/zkServer.sh start-foreground &>> logs/zk.out &
|
||||
PIDS="$PIDS $!"
|
||||
Print Zookeeper started.
|
||||
}
|
||||
|
||||
function Main {
|
||||
|
Reference in New Issue
Block a user