diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/base-config | 5 | ||||
-rw-r--r-- | services/config.template | 2 | ||||
-rwxr-xr-x | services/docker/mail-server/app/main.bash | 2 | ||||
-rwxr-xr-x | services/manage | 21 |
4 files changed, 9 insertions, 21 deletions
diff --git a/services/base-config b/services/base-config deleted file mode 100644 index ccd1e1b..0000000 --- a/services/base-config +++ /dev/null @@ -1,5 +0,0 @@ -CRUPEST_DOMAIN=crupest.life -CRUPEST_EMAIL=crupest@crupest.life -CRUPEST_GITHUB=https://github.com/crupest -CRUPEST_SERVICES_DIR=services -CRUPEST_DATA_DIR=data diff --git a/services/config.template b/services/config.template index 89448ce..7ae39a7 100644 --- a/services/config.template +++ b/services/config.template @@ -1,3 +1,5 @@ +CRUPEST_SERVICES_DIR=services +CRUPEST_DATA_DIR=data CRUPEST_ROOT_URL=https://@@CRUPEST_DOMAIN@@ CRUPEST_MAIL_SERVER_DOMAIN=mail.@@CRUPEST_DOMAIN@@ CRUPEST_DOCKER_DIR=@@CRUPEST_SERVICES_DIR@@/docker diff --git a/services/docker/mail-server/app/main.bash b/services/docker/mail-server/app/main.bash index f57d254..14900d7 100755 --- a/services/docker/mail-server/app/main.bash +++ b/services/docker/mail-server/app/main.bash @@ -7,7 +7,5 @@ die() { exit 1 } -/app/crupest-relay init || die "crupest-relay failed to init." - /app/crupest-relay real-serve & /dovecot/sbin/dovecot -F diff --git a/services/manage b/services/manage index 4589475..c81e6dc 100755 --- a/services/manage +++ b/services/manage @@ -2,23 +2,16 @@ set -e -python3 --version >/dev/null 2>&1 || ( - echo Error: failed to run Python with python3 --version. +deno --version >/dev/null 2>&1 || ( + echo "Error: failed to run deno --version." + echo "If deno is not installed, install it with:" + echo " curl -fsSL https://deno.land/install.sh | sh" exit 1 ) -script_dir="$(dirname "$0")" - -# shellcheck disable=SC2046 -export $(xargs <"${script_dir:?}/base-config") - -CRUPEST_PROJECT_DIR="$(realpath "$script_dir/..")" +CRUPEST_PROJECT_DIR="$(realpath "$(dirname "$0")/..")" export CRUPEST_PROJECT_DIR -export PYTHONPATH="$CRUPEST_PROJECT_DIR/python:$PYTHONPATH" +echo "Project Dir: $CRUPEST_PROJECT_DIR" -if [[ "$#" != "0" ]] && [[ "$1" == "gen-tmpl" ]]; then - python3 -m cru.service template generate "${@:2}" -else - python3 -m cru.service "$@" -fi +exec deno run -A "$CRUPEST_PROJECT_DIR/deno/service-manager/main.ts" --project-dir "$CRUPEST_PROJECT_DIR" "$@" |