#!/usr/bin/env bash

COMMAND="java"
if [ "$(whoami)" != "zookeeper" ]
then
	COMMAND="sudo -u zookeeper java"
fi

source /home/zookeeper/.profile

/opt/zookeeper/zookeeper-<%= node[:zookeeper][:version] %>/bin/zkCleanup.sh  <%= node[:zookeeper][:dataDir] %> <%= node[:zookeeper][:snapshotDir] %> <%= node[:zookeeper][:snapshotNum] %>

exit 0

#!/usr/bin/env bash

COMMAND="java"
if [ "$(whoami)" != "zookeeper" ]
then
	COMMAND="sudo -u zookeeper java"
fi

source /home/zookeeper/.profile

<%= node[:zookeeper][:installDir] %>/zookeeper-<%= node[:zookeeper][:version] %>/bin/zkCleanup.sh  <%= node[:zookeeper][:dataDir] %> <%= node[:zookeeper][:snapshotDir] %> <%= node[:zookeeper][:snapshotNum] %>

exit 0

Use attributes for the installdir not a hardcoded value
Use attributes for the installdir not a hardcoded value


Former-commit-id: c792da4493941abe53ee6f7e9ae20ed204e361f2 [formerly b4c30a20b9699d7b8be2aeb7b6a94edd9a827340] [formerly 8f472c4f35f2b7fafe8c217420f02c633798dd18 [formerly 58d7e05b08e2d69d9703cc79025a132cab40276a [formerly e39f1529f43fe8dc4cc794b7af0d96226d4413e6]]]
Former-commit-id: ad3c888d05d2bda9a512140c044e38cf16024a8a [formerly fdb1790d150b72086b8e8e06e99333777c882faa]
Former-commit-id: 5b131b9697649d8457ecfd40d18062f507e6627b
Former-commit-id: 5b1abe58f6e24dc2e518e6032a7138308bc6b9e9