startServices.sh 638 Bytes
Newer Older
1
#!/bin/bash
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
unameOut="$(uname -s)"
case "${unameOut}" in
    Linux*)     machine=Linux;;
    Darwin*)    machine=Mac;;
    CYGWIN*)    machine=Cygwin;;
    MINGW*)     machine=MinGw;;
    *)          machine="UNKNOWN:${unameOut}"
esac
echo Detected: ${machine}
if [ "$machine" = "Mac" ]; then
  echo "Staring PostgreSQL..."
  screen -dmS postgres /usr/local/bin/postgres
  echo "Starting Redis..."
  screen -dmS redis /usr/local/bin/redis-server
fi
if [ "$machine" = "Linux" ]; then
  echo "Staring PostgreSQL..."
  screen -dmS postgres /usr/bin/postgres
  echo "Starting Redis..."
  screen -dmS redis /usr/bin/redis-server
fi
23
screen -ls