blob: 36ae91fb9b31634cdaaa3b9086f5b927a37b5ba6 [file] [log] [blame]
#!/bin/bash
# Copyright 2015 The Vanadium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Runs slcli against master device Syncbase.
set -eu
source "${JIRI_ROOT}/release/projects/sensorlog/go/src/v.io/x/sensorlog/scripts/runner_lib.sh"
# Must be run with V23_CREDENTIALS set or through the agent.
# Optional environment variables: SL_PREFIX, SL_DEVID, SL_IPADDR_PORT
function main() {
local -r PREFIX="${SL_PREFIX:-sl/client}"
local -r DEVID="${SL_DEVID:-main}"
local -r NAME="${PREFIX}/${DEVID}"
local -r IPADDR_PORT="${SL_IPADDR_PORT:-$(dig $(hostname) +short):8202}"
run_slcli "/${IPADDR_PORT}" "${NAME}" "$@"
}
main "$@"