2020-12-11 14:23:08 -05:00
|
|
|
#!/usr/bin/env bash
|
2020-12-15 10:27:53 -05:00
|
|
|
set -x
|
2020-12-11 14:23:08 -05:00
|
|
|
|
|
|
|
export PATH=$PATH:$HOME/.local/bin
|
2020-12-15 10:27:53 -05:00
|
|
|
export VIRTUAL_ENV=$HOME/.venv3
|
|
|
|
source $VIRTUAL_ENV/bin/activate
|
|
|
|
|
|
|
|
if [ ! -z "${APRS_PLUGINS}" ]; then
|
|
|
|
OLDIFS=$IFS
|
|
|
|
IFS=','
|
|
|
|
echo "Installing pypi plugins '$APRS_PLUGINS'";
|
|
|
|
for plugin in ${APRS_PLUGINS}; do
|
|
|
|
IFS=$OLDIFS
|
|
|
|
# call your procedure/other scripts here below
|
|
|
|
echo "Installing '$plugin'"
|
|
|
|
pip3 install $plugin
|
|
|
|
done
|
|
|
|
fi
|
2020-12-11 14:23:08 -05:00
|
|
|
|
|
|
|
# check to see if there is a config file
|
|
|
|
APRSD_CONFIG="/config/aprsd.yml"
|
|
|
|
if [ ! -e "$APRSD_CONFIG" ]; then
|
|
|
|
echo "'$APRSD_CONFIG' File does not exist. Creating."
|
|
|
|
aprsd sample-config > $APRSD_CONFIG
|
|
|
|
fi
|
2020-12-15 10:27:53 -05:00
|
|
|
$VIRTUAL_ENV/bin/aprsd server -c $APRSD_CONFIG
|