Update .env, config generate action, and pull MSI

This commit is contained in:
Wes Lambert
2020-07-28 03:17:35 +00:00
parent 3e17969421
commit 8426c6eda3
4 changed files with 9 additions and 4 deletions

View File

@@ -13,12 +13,12 @@ CLIENT_DIR="/velociraptor/clients"
cp /opt/velociraptor/linux/velociraptor . && chmod +x velociraptor
mkdir -p $CLIENT_DIR/linux && cp /opt/velociraptor/linux/velociraptor /velociraptor/clients/linux/velociraptor_client
mkdir -p $CLIENT_DIR/mac && mv /opt/velociraptor/mac/velociraptor_client /velociraptor/clients/mac/velociraptor_client
mkdir -p $CLIENT_DIR/windows && mv /opt/velociraptor/windows/velociraptor_client.exe /velociraptor/clients/windows/velociraptor_client.exe
mkdir -p $CLIENT_DIR/windows && mv /opt/velociraptor/windows/velociraptor_client* /velociraptor/clients/windows/
# If no existing server config, set it up
if [ ! -f server.config.yaml ]; then
./velociraptor config generate > server.config.yaml --merge '{"Frontend":{"public_path":"'$PUBLIC_PATH'"},"API":{"bind_address":"'$BIND_ADDRESS'"},"GUI":{"bind_address":"'$BIND_ADDRESS'"},"Monitoring":{"bind_address":"'$BIND_ADDRESS'"},"Logging":{"output_directory":"'$LOG_DIR'","separate_logs_per_component":true},"Client":{"server_urls":["'$SERVER_URL'"],"use_self_signed_ssl":true}, "Datastore":{"location":"'$DATASTORE_LOCATION'", "filestore_directory":"'$FILESTORE_DIRECTORY'"}}'
sed -i "s#https://localhost:8000/#$SERVER_URL#" server.config.yaml
./velociraptor config generate > server.config.yaml --merge '{"Frontend":{"public_path":"'$PUBLIC_PATH'", "hostname":"'$VELOX_FRONTEND_HOSTNAME'"},"API":{"bind_address":"'$BIND_ADDRESS'"},"GUI":{"bind_address":"'$BIND_ADDRESS'"},"Monitoring":{"bind_address":"'$BIND_ADDRESS'"},"Logging":{"output_directory":"'$LOG_DIR'","separate_logs_per_component":true},"Client":{"server_urls":["'$VELOX_SERVER_URL'"],"use_self_signed_ssl":true}, "Datastore":{"location":"'$DATASTORE_LOCATION'", "filestore_directory":"'$FILESTORE_DIRECTORY'"}}'
#sed -i "s#https://localhost:8000/#$VELOX_CLIENT_URL#" server.config.yaml
sed -i 's#/tmp/velociraptor#.#'g server.config.yaml
./velociraptor --config server.config.yaml user add $VELOX_USER $VELOX_PASSWORD --role $VELOX_ROLE
fi