#!/bin/bash
#
# This script should be called by launchd at user login
# If you want to launch it manually use:
# launchctl load Library/LaunchAgents/com.rousette.tracks.plist
#
# Unload it manually with:
# launchctl unload Library/LaunchAgents/com.rousette.tracks.plist
# You'll then need to kill the server manually:
#
# ps ax | grep -i "ruby script/server" | grep -v grep | awk '{print $1}'
# Note the number this command returns (e.g. 1284) and type:
#
# kill 1284

cd /Users/YOURUSERNAME/PATHTO/tracks
ruby script/server --environment=production --port=3030
                                        
