fix permissions for distributed setup

This commit is contained in:
t3chn0m4g3 2022-03-30 15:53:08 +00:00
parent bb6be77f53
commit 22276d1cc6
2 changed files with 4 additions and 1 deletions

View file

@ -49,7 +49,8 @@ RUN apt-get update -y && \
chown -R logstash:logstash /etc/listbot \
/var/log/logstash/ \
/var/lib/logstash \
/usr/share/logstash/data && \
/usr/share/logstash/data \
/usr/share/logstash/config/pipelines* && \
chmod 755 /usr/bin/entrypoint.sh && \
#
# Clean up

View file

@ -46,6 +46,8 @@ if [ "$MY_TPOT_TYPE" == "SENSOR" ];
echo "Hive username: $MY_HIVE_USERNAME"
echo "Hive IP: $MY_HIVE_IP"
echo
# Ensure correct file permissions for private keyfile or SSH will ask for password
chmod 600 $MY_SENSOR_PRIVATEKEYFILE
cp /usr/share/logstash/config/pipelines_sensor.yml /usr/share/logstash/config/pipelines.yml
autossh -f -M 0 -4 -l $MY_HIVE_USERNAME -i $MY_SENSOR_PRIVATEKEYFILE -p 64295 -N -L64305:127.0.0.1:64305 $MY_HIVE_IP -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"
exit 0