blob: beaf97f49ea74c3a232af94ecd65523f1226b428 [file] [log] [blame]
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
export PATH=$PATH:/usr/local/sbin/
export PATH=$PATH:/usr/sbin/
export PATH=$PATH:/sbin
service ssh start && service opscenterd start && service cassandra start
# Save Enviroemnt Variables incase ot attach to the container with new tty
env | awk '{split($0,a,"\n"); print "export " a[1]}' > /etc/env_profile
container_ip=$(hostname -I | cut -d' ' -f1)
#sed -i "/^rpc_address:/ s|.*|\n|" /etc/cassandra/cassandra.yaml
#echo "rpc_address: "$container_ip >> /etc/cassandra/cassandra.yaml
echo "broadcast_rpc_address: "$container_ip >> /etc/cassandra/cassandra.yaml
echo "export PATH=$PATH" >> /etc/env_profile
if [[ $1 == "-d" ]]; then
while true; do
sleep 1000;
done
fi
if [[ $1 == "-bash" ]]; then
/bin/bash
fi