mirror of
https://git.asonix.dog/ceralor/mastodon.git
synced 2025-10-13 05:44:48 +00:00
21 lines
355 B
Bash
Executable file
21 lines
355 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if ! pg_ctl -D ./postgres/16 status; then
|
|
pg_ctl -D ./postgres/16 -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/16 stop
|