Commit 32d6de2b authored by Vasilis Tsiligiannis's avatar Vasilis Tsiligiannis

Update 'satnogs-setup' script

Signed-off-by: Vasilis Tsiligiannis's avatarVasilis Tsiligiannis <acinonyx@openwrt.gr>
parent 363eb4a6
Pipeline #13046067 passed with stage
in 64 minutes and 11 seconds
#!/bin/sh
#
# SatNOGS client setup bootstrap script
#
# Copyright (C) 2017 Libre Space Foundation <https://libre.space/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. /etc/default/satnogs-setup
ansible-pull -U "$SATNOGS_SETUP_ANSIBLE_URL" satnogs-setups.yml
ANSIBLE_DIR="$HOME/.satnogs/ansible"
STAMP="$HOME/.satnogs/.bootstrapped"
if [ ! -f "$STAMP" ]; then
if ansible-pull -d "$ANSIBLE_DIR" -U "$SATNOGS_SETUP_ANSIBLE_URL" "$@" satnogs-setups.yml; then
touch "$STAMP"
fi
fi
local ansible_connection=local
localhost ansible_connection=local
[satnogs-setups]
localhost
[satnogs-radios]
localhost
[hamlib-utils]
localhost
[satnogs-clients]
localhost
......@@ -22,20 +22,14 @@ BOOTSTRAP_SCRIPT="bootstrap.sh"
SETUP_SCRIPT="setup.sh"
CONFIG_SCRIPT="config.sh"
if [ -x "${PREFIX}/${BOOTSTRAP_SCRIPT}" ] && [ "$1" != "-n" ]; then
"${PREFIX}/${BOOTSTRAP_SCRIPT}"
if [ -x "${PREFIX}/${BOOTSTRAP_SCRIPT}" ]; then
. "${PREFIX}/${BOOTSTRAP_SCRIPT}"
fi
if [ -x "${PREFIX}/${CONFIG_SCRIPT}" ]; then
"${PREFIX}/${CONFIG_SCRIPT}"
. "${PREFIX}/${CONFIG_SCRIPT}"
fi
if [ -x "${PREFIX}/${SETUP_SCRIPT}" ]; then
if [ "$1" != "-n" ]; then
echo "Updating software and applying configuration. This may take a while..."
"${PREFIX}/${SETUP_SCRIPT}"
else
echo "Applying configuration..."
"${PREFIX}/${SETUP_SCRIPT}" -t config
fi
. "${PREFIX}/${SETUP_SCRIPT}"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment