valkey-server OR redis-server.sh

This commit is contained in:
Bel LaPointe
2026-02-04 08:38:18 -07:00
parent 8b8fafca21
commit 60241736c6
2 changed files with 7 additions and 3 deletions

View File

@@ -31,7 +31,6 @@ func listen(ctx context.Context, config Config) error {
} else {
wg.Add(1)
go func() {
defer log.Println("/handle()")
defer wg.Done()
handle(ctx, config, conn)
}()

View File

@@ -1,9 +1,14 @@
#! /usr/bin/bash
bin=valkey-server
if ! which valkey-server; then
bin=redis-server
fi
d=$(mktemp -d)
mkdir -p $d/1
mkdir -p $d/2
valkey-server --dir $d/1 --port 60113 --logfile $d/1.log &
$bin --dir $d/1 --port 60113 --logfile $d/1.log &
bg=${!}
cleanup() {
kill $bg
@@ -13,5 +18,5 @@ trap cleanup EXIT
sleep 5
echo FORWARDS=127.0.0.1:60113,127.0.0.1:60114
) &
valkey-server --dir $d/2 --port 60114 --logfile $d/2.log
$bin --dir $d/2 --port 60114 --logfile $d/2.log