From 93a1e65bad555b27be2500b3eb14c49ed427cc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sara=20Aim=C3=A9e=20Smiseth?= <51710585+SaraSmiseth@users.noreply.github.com> Date: Sat, 10 Oct 2020 08:25:37 +0200 Subject: [PATCH] clean up array fix --- .gitignore | 3 +-- conf.d/03-e2e-policy.cfg.lua | 7 +------ docker-entrypoint.sh | 8 -------- prosody.cfg.lua | 12 ------------ tests/docker-compose.yml | 23 ----------------------- tests/test.zsh | 18 ------------------ 6 files changed, 2 insertions(+), 69 deletions(-) delete mode 100644 tests/docker-compose.yml delete mode 100755 tests/test.zsh diff --git a/.gitignore b/.gitignore index 8e23fc8..07f43b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -data/* -tests/certs/ +data/* \ No newline at end of file diff --git a/conf.d/03-e2e-policy.cfg.lua b/conf.d/03-e2e-policy.cfg.lua index da38f0d..88a7ca8 100644 --- a/conf.d/03-e2e-policy.cfg.lua +++ b/conf.d/03-e2e-policy.cfg.lua @@ -2,12 +2,7 @@ local stringy = require "stringy" e2e_policy_chat = os.getenv("E2E_POLICY_CHAT") e2e_policy_muc = os.getenv("E2E_POLICY_MUC") - -local e2ePolicyWhitelist = os.getenv("E2E_POLICY_WHITELIST") -print("e2ePolicyWhitelist:") -print(e2ePolicyWhitelist) -e2e_policy_whitelist = stringy.split(e2ePolicyWhitelist, ", ") - +e2e_policy_whitelist = stringy.split(os.getenv("E2E_POLICY_WHITELIST"), ", ") e2e_policy_message_optional_chat = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for conversations on this server." e2e_policy_message_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server." e2e_policy_message_optional_muc = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for MUC on this server." diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 167e3d8..a7090d3 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,8 +1,6 @@ #!/bin/bash set -e -echo "docker-entrypoint.sh" - export ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-true} export DOMAIN_HTTP_UPLOAD=${DOMAIN_HTTP_UPLOAD:-"upload.$DOMAIN"} export DOMAIN_MUC=${DOMAIN_MUC:-"conference.$DOMAIN"} @@ -23,12 +21,7 @@ export SERVER_CONTACT_INFO_SECURITY=${SERVER_CONTACT_INFO_SECURITY:-"xmpp:securi export SERVER_CONTACT_INFO_SUPPORT=${SERVER_CONTACT_INFO_SUPPORT:-"xmpp:support@$DOMAIN"} export PROSODY_ADMINS=${PROSODY_ADMINS:-""} -echo "docker-entrypoint.sh ENV variables initialized" - if [[ "$1" != "prosody" ]]; then - echo "docker-entrypoint.sh prosodyctl" - echo "docker-entrypoint.sh @ $@" - echo "docker-entrypoint.sh * $*" exec prosodyctl $* exit 0; fi @@ -42,5 +35,4 @@ if [ -z "$DOMAIN" ]; then exit 1 fi -echo "docker-entrypoint.sh last command" exec "$@" diff --git a/prosody.cfg.lua b/prosody.cfg.lua index b2f8ace..f0b0f3c 100644 --- a/prosody.cfg.lua +++ b/prosody.cfg.lua @@ -1,27 +1,15 @@ -- see example config at https://hg.prosody.im/0.9/file/0.9.10/prosody.cfg.lua.dist -- easily extendable by putting into different config files within conf.d folder - -print("Hello") -print("World") -print(os.getenv("PROSODY_ADMINS")); - local stringy = require "stringy" -print(stringy.split(os.getenv("PROSODY_ADMINS"), ",")) -print(stringy.split(os.getenv("PROSODY_ADMINS"), ", ")) - admins = stringy.split(os.getenv("PROSODY_ADMINS"), ", "); -print(admins); - pidfile = "/var/run/prosody/prosody.pid" use_libevent = true; -- improves performance allow_registration = os.getenv("ALLOW_REGISTRATION"); -print("allow_registration:") -print(allow_registration) c2s_require_encryption = os.getenv("C2S_REQUIRE_ENCRYPTION"); s2s_require_encryption = os.getenv("S2S_REQUIRE_ENCRYPTION"); diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml deleted file mode 100644 index 249f6ee..0000000 --- a/tests/docker-compose.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: '3.7' - -services: - prosody: - image: prosody - restart: unless-stopped - ports: - - "5000:5000" - - "5222:5222" - - "5223:5223" - - "5269:5269" - - "5281:5281" - environment: - DOMAIN: prosody - PROSODY_ADMINS: "admin@prosody, admin2@prosody" - extra_hosts: - - "conference.prosody:127.0.0.1" - - "pubsub.prosody:127.0.0.1" - - "proxy.prosody:127.0.0.1" - - "upload.prosody:127.0.0.1" - volumes: - - ./certs:/usr/local/etc/prosody/certs - #- ./data:/usr/local/var/lib/prosody diff --git a/tests/test.zsh b/tests/test.zsh deleted file mode 100755 index a1a43b3..0000000 --- a/tests/test.zsh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/zsh - -# generate certs for testing - -generateCert() { - DOMAIN="$1" - mkdir -p certs/"$DOMAIN" - cd certs/"$DOMAIN" - openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out fullchain.pem -days 365 -subj "/CN=$DOMAIN" -nodes - chmod 777 *.pem - cd ../../ -} - -generateCert "prosody" -generateCert "conference.prosody" -generateCert "pubsub.prosody" -generateCert "proxy.prosody" -generateCert "upload.prosody"