Skip to content
Extraits de code Groupes Projets
server 904 octets
Newer Older
  • Learn to ignore specific revisions
  • #
    # Start diaspora websocket and main services
    #
    
    
    # Is someone listening on the port already? (ipv4 only test ?)
    PORT=3000
    while getopts ":p:" OPTION
    do
    
      if [ $OPTION == 'p' ]
    
    services=$( netstat -nl | grep ":$PORT[ \t]")
    
    
    Raphael's avatar
    Raphael a validé
        echo "Warning: something is already using port "$PORT
    
    # Check if Mongo is running
    
    if ! ps ax | grep -v grep | grep mongod >/dev/null
    then
        echo "Mongod not started"
    else
        mkdir -p -v log/thin/
    
    Alec Leamas's avatar
    Alec Leamas a validé
        test -w public -a ! -e  public/source.tar.gz &&
            tar czf public/source.tar.gz  --exclude='source.tar.gz' -X .gitignore *
        test -e public/source.tar.gz || {
            echo "Can't find, or even create, public/source.tar.gz. Giving up"
    
        bundle exec ruby ./script/websocket_server.rb&
        bundle exec thin start $@
    fi