Skip to content

Instantly share code, notes, and snippets.

@Landrash
Created November 5, 2018 14:32
Show Gist options
  • Save Landrash/5215ac81af4c58c5ed1d47921923cefc to your computer and use it in GitHub Desktop.
Save Landrash/5215ac81af4c58c5ed1d47921923cefc to your computer and use it in GitHub Desktop.
#!/bin/bash
function find3cli-show-short-info {
echo "Setup for find3-cli. "
}
function find3cli-show-long-info {
echo "This script installs find3-cli."
}
function find3cli-show-copyright-info {
echo "Original concept by nixme <https://github.com/nixme>."
}
function find3cli-install-package {
echo "Installating dependencies"
apt install wireless-tools net-tools libpcap-dev bluetooth golang
go get -u -v github.com/schollz/find3-cli-scanner
mv $GOPATH/bin/find3-cli-scanner /usr/local/bin
echo "Checking the installation..."
if [ ! -f /opt/monitor/monitor.sh ]; then
validation=""
else
validation="ok"
fi
if [ ! -z "${validation}" ]; then
echo
echo -e "\\e[32mInstallation done..\\e[0m"
echo -e "Update of mqtt_preferences is required found at /opt/monitor/mqtt_prefences"
echo -e "Some further configuration is required and details can be found here https://github.com/andrewjfreyer/monitor#getting-started "
echo
else
echo
echo -e "\\e[31mInstallation failed..."
echo
return 1
fi
return 0
}
[[ "$_" == "$0" ]] && echo "hassbian-config helper script; do not run directly, use hassbian-config instead"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment