Created
August 22, 2016 14:34
-
-
Save kevsmith/e01877f1ad57ab8a4cd71fb527b1771b to your computer and use it in GitHub Desktop.
NYLUG demo scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Uses cogctl built from a release | |
# Keeps .cogctl from stomping on the | |
# file stored in $HOME | |
scriptdir=$(dirname ${0}) | |
configdir=$(cd ${scriptdir}/.. && pwd) | |
real_cogctl=${scriptdir}/cogctl2 | |
if [ $# == 0 ]; then | |
${real_cogctl} | |
else | |
if [ "$1" == "--help" ] || [ "$2" == "--help" ]; then | |
${real_cogctl} $@ | |
else | |
${real_cogctl} $@ --config-file ${configdir}/.cogctl | |
fi | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pushd . >& /dev/null | |
function cleanup { | |
popd >& /dev/null | |
} | |
trap "cleanup;" SIGINT SIGTERM | |
scriptdir=$(cd $(dirname ${0}) && pwd) | |
. ${scriptdir}/creds.sh | |
cd ${scriptdir}/../cog | |
iface=en4 | |
if [ "$1" != "" ]; then | |
iface=${1} | |
fi | |
set -x | |
COG_SERVICE_URL_BASE=http://`ipconfig getifaddr ${iface}`:4002 \ | |
COG_MQTT_HOST=0.0.0.0 \ | |
COG_ALLOW_SELF_REGISTRATION=1 \ | |
ENABLE_SPOKEN_COMMANDS=true \ | |
make run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
scriptdir=$(dirname ${0}) | |
dynconfigs=$(cd ${scriptdir}/.. && pwd)/dynconfig | |
mkdir -p ${dynconfigs} | |
iface=en4 | |
if [ "$1" != "" ]; then | |
iface=${1} | |
fi | |
set -x | |
RELAY_ID=2777ad90-5211-497f-b095-52729635a60d \ | |
RELAY_COG_TOKEN=sekrit \ | |
RELAY_DOCKER_USE_ENV=1 \ | |
RELAY_DOCKER_CLEAN_INTERVAL=10s \ | |
RELAY_COG_REFRESH_INTERVAL=10s \ | |
RELAY_DYNAMIC_CONFIG_ROOT=${dynconfigs} \ | |
RELAY_LOG_LEVEL=debug \ | |
RELAY_MANAGED_DYNAMIC_CONFIG=true \ | |
RELAY_COG_HOST=`ipconfig getifaddr ${iface}` ${scriptdir}/relay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment