22 lines
355 B
Bash
Executable file
22 lines
355 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if ! pg_ctl -D ./postgres/15 status; then
|
|
pg_ctl -D ./postgres/15 -l ./postgres/postgresql.log start
|
|
fi
|
|
|
|
redis-server > ./redis/redis.log 2> ./redis/redis.err &
|
|
|
|
echo
|
|
echo "Launched postgres and redis"
|
|
echo "Hit [enter] to stop services"
|
|
|
|
read -e
|
|
|
|
for pid in $(jobs -p); do
|
|
kill -9 $pid
|
|
done
|
|
|
|
pg_ctl -D ./postgres/15 stop
|