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
|
|
|
|
2021-01-12 16:17:11 -05:00
|
|
|
if [ ! -z "${APRSD_PLUGINS}" ]; then
|
2020-12-15 10:27:53 -05:00
|
|
|
OLDIFS=$IFS
|
|
|
|
IFS=','
|
2021-01-12 16:17:11 -05:00
|
|
|
echo "Installing pypi plugins '$APRSD_PLUGINS'";
|
|
|
|
for plugin in ${APRSD_PLUGINS}; do
|
2020-12-15 10:27:53 -05:00
|
|
|
IFS=$OLDIFS
|
|
|
|
# call your procedure/other scripts here below
|
|
|
|
echo "Installing '$plugin'"
|
2023-07-17 17:57:39 -04:00
|
|
|
pip3 install --user $plugin
|
2020-12-15 10:27:53 -05:00
|
|
|
done
|
|
|
|
fi
|
2020-12-11 14:23:08 -05:00
|
|
|
|
2024-02-25 15:05:45 -05:00
|
|
|
if [ ! -z "${APRSD_EXTENSIONS}" ]; then
|
|
|
|
OLDIFS=$IFS
|
|
|
|
IFS=','
|
|
|
|
echo "Installing APRSD extensions from pypi '$APRSD_EXTENSIONS'";
|
|
|
|
for extension in ${APRSD_EXTENSIONS}; do
|
|
|
|
IFS=$OLDIFS
|
|
|
|
# call your procedure/other scripts here below
|
|
|
|
echo "Installing '$extension'"
|
|
|
|
pip3 install --user $extension
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2021-12-02 20:08:41 -05:00
|
|
|
if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then
|
|
|
|
LOG_LEVEL="DEBUG"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Log level is set to ${LOG_LEVEL}";
|
|
|
|
|
2020-12-11 14:23:08 -05:00
|
|
|
# check to see if there is a config file
|
2022-12-30 10:13:25 -05:00
|
|
|
APRSD_CONFIG="/config/aprsd.conf"
|
2020-12-11 14:23:08 -05:00
|
|
|
if [ ! -e "$APRSD_CONFIG" ]; then
|
|
|
|
echo "'$APRSD_CONFIG' File does not exist. Creating."
|
|
|
|
aprsd sample-config > $APRSD_CONFIG
|
|
|
|
fi
|
2021-02-16 10:05:11 -05:00
|
|
|
|
2022-01-08 09:41:17 -05:00
|
|
|
export COLUMNS=200
|
|
|
|
python3 -m rich.diagnose
|
2021-12-02 20:08:41 -05:00
|
|
|
exec aprsd server -c $APRSD_CONFIG --loglevel ${LOG_LEVEL}
|