2023-07-17 09:25:03 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
|
|
|
|
if [ ! -z "${APRSD_PLUGINS}" ]; then
|
|
|
|
OLDIFS=$IFS
|
|
|
|
IFS=','
|
|
|
|
echo "Installing pypi plugins '$APRSD_PLUGINS'";
|
|
|
|
for plugin in ${APRSD_PLUGINS}; do
|
|
|
|
IFS=$OLDIFS
|
|
|
|
# call your procedure/other scripts here below
|
|
|
|
echo "Installing '$plugin'"
|
2023-07-17 17:57:39 -04:00
|
|
|
pip3 install --user $plugin
|
2023-07-17 09:25:03 -04:00
|
|
|
done
|
|
|
|
fi
|
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
|
2023-07-17 09:25:03 -04:00
|
|
|
|
|
|
|
if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then
|
|
|
|
LOG_LEVEL="DEBUG"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Log level is set to ${LOG_LEVEL}";
|
|
|
|
|
|
|
|
# check to see if there is a config file
|
|
|
|
APRSD_CONFIG="/config/aprsd.conf"
|
|
|
|
if [ ! -e "$APRSD_CONFIG" ]; then
|
|
|
|
echo "'$APRSD_CONFIG' File does not exist. Creating."
|
|
|
|
aprsd sample-config > $APRSD_CONFIG
|
|
|
|
fi
|
|
|
|
|
|
|
|
export COLUMNS=200
|
2023-07-19 14:50:42 -04:00
|
|
|
#exec gunicorn -b :8000 --workers 4 "aprsd.admin_web:create_app(config_file='$APRSD_CONFIG', log_level='$LOG_LEVEL')"
|
2023-07-23 18:54:23 -04:00
|
|
|
# exec gunicorn -b :8000 --workers 4 "aprsd.wsgi:app"
|
|
|
|
exec uwsgi --http :8000 --gevent 1000 --http-websockets --master -w aprsd.wsgi --callable app
|
2023-07-17 09:25:03 -04:00
|
|
|
#exec aprsd listen -c $APRSD_CONFIG --loglevel ${LOG_LEVEL} ${APRSD_LOAD_PLUGINS} ${APRSD_LISTEN_FILTER}
|