zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit e1559558a57bfe37187ece311996ef4856bb08bd
parent be56bf87ba7d803f32531dfd691b97522cba338e
Author: srfsh <dev@srf.sh>
Date:   Fri, 15 Jul 2022 14:53:25 +0300

conf: tiny fix

Diffstat:
Mconf/.env.templ | 1-
Mconf/runtime.exs | 7+------
Mmann | 4++--
3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/conf/.env.templ b/conf/.env.templ @@ -12,7 +12,6 @@ ## restroom #export ROOM_HOST= #export ROOM_PORT= -export ROOM_SALT=$ROOM_SALT ## admin export ADMIN_KEY=$ADMIN_KEY diff --git a/conf/runtime.exs b/conf/runtime.exs @@ -51,14 +51,9 @@ config :zenflows, Zenflows.DB.Repo, db_conf # # restroom # -room_salt = fetch_env!("ROOM_SALT") -if Base.decode16!(room_salt, case: :lower) |> byte_size() != 64, - do: raise "ROOM_SALT must be a 64-octect long, lowercase-base16-encoded string" - config :zenflows, Zenflows.Restroom, room_host: fetch_env!("ROOM_HOST"), - room_port: fetch_env!("ROOM_PORT"), - room_salt: room_salt + room_port: fetch_env!("ROOM_PORT") # # admin diff --git a/mann b/mann @@ -152,8 +152,8 @@ cmd_env_setup() { if test -e conf/env.sh ; then warn "the file 'conf/env.sh' already exists; skipping" else - salt=$(openssl rand -hex 64) - sed s,\$ROOM_SALT,"$salt", conf/.env.templ >conf/env.sh + key=$(openssl rand -hex 64) + sed s,\$ADMIN_KEY,"$key", conf/.env.templ >conf/env.sh warn "the 'conf/env.sh' file is generated, please edit it to suit your needs" fi }