mirror of
https://github.com/Cameri/nostream.git
synced 2025-12-18 16:41:08 +01:00
feat: massive update
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
#!/bin/bash
|
||||
PROJECT_ROOT="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))/.."
|
||||
DOCKER_COMPOSE_FILE="${PROJECT_ROOT}/docker-compose.yml"
|
||||
NOSTR_CONFIG_DIR="${PROJECT_ROOT}/.nostr"
|
||||
SETTINGS_FILE="${NOSTR_CONFIG_DIR}/settings.yaml"
|
||||
DEFAULT_SETTINGS_FILE="${PROJECT_ROOT}/resources/default-settings.yaml"
|
||||
|
||||
if [ "$EUID" -eq 0 ]
|
||||
then echo "Error: Nostream should not be run as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d "${NOSTR_CONFIG_DIR}" ]]; then
|
||||
echo "Creating folder ${NOSTR_CONFIG_DIR}"
|
||||
mkdir -p "${NOSTR_CONFIG_DIR}"
|
||||
fi
|
||||
|
||||
if [[ ! -f "${SETTINGS_FILE}" ]]; then
|
||||
echo "Copying ${DEFAULT_SETTINGS_FILE} to ${SETTINGS_FILE}"
|
||||
cp "${DEFAULT_SETTINGS_FILE}" "${SETTINGS_FILE}"
|
||||
fi
|
||||
|
||||
docker compose \
|
||||
-f $DOCKER_COMPOSE_FILE \
|
||||
|
||||
Reference in New Issue
Block a user