Skip to content

Instantly share code, notes, and snippets.

@bensochar
Created June 18, 2015 17:52
Show Gist options
  • Save bensochar/f51688290e5a1c328f4b to your computer and use it in GitHub Desktop.
Save bensochar/f51688290e5a1c328f4b to your computer and use it in GitHub Desktop.
start redis posgres foreman
#!/bin/bash
#echo on
set -x
echo load postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
echo start redis
redis-server /usr/local/etc/redis.conf --daemonize yes
echo start puma with foreman
foreman start
echo unload postgres
pg_ctl -D /usr/local/var/postgres stop -s -m fast
echo stop redis
ps aux | grep 'redis-server' | awk '{print $2}' | xargs kill -9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment