Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions killscreens.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/zsh
screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill

27 changes: 27 additions & 0 deletions launch_stations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from config import *

from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy

from rootio.extensions import db

import zmq
from utils import ZMQ, init_logging

from rootio.telephony.models import *
from rootio.radio.models import *

import time
app = Flask("ResponseServer")
app.config['SQLALCHEMY_DATABASE_URI'] = SQLALCHEMY_DATABASE_URI
db = SQLAlchemy(app)

logger = init_logging('launch_stations')

daemons = []
from station_daemon import StationDaemon
stations = db.session.query(Station).all()
for i in stations:
daemons.append(StationDaemon(i.id))
time.sleep(1)

32 changes: 32 additions & 0 deletions launcher.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
screen -S redis_server -dm sudo /usr/local/Cellar/redis/2.8.13/bin/redis-server /usr/local/etc/redis.conf
echo "launched redis... sleeping for a second..."
sleep 1
screen -S freeswitch -dm /usr/local/freeswitch/freeswitch
echo "launched freeswitch"

cd /usr/local/plivo
screen -S plivo-rest -dm /usr/local/plivo/bin/plivo-rest
screen -S plivo-outbound -dm /usr/local/plivo/bin/plivo-outbound
screen -S plivo-cache -dm /usr/local/plivo/bin/plivo-cache
echo "launced three plivo processes -- rest, outbout, cache"

cd /Users/csik/Documents/code/rootio/rootio_web/scheduler
source vnv/bin/activate
screen -S forwarder.py -dm /Users/csik/Documents/code/rootio/rootio_web/vnv/bin/python forwarder_device.py
echo "Launched forwarder.py"

screen -S run.py -dm /Users/csik/Documents/code/rootio/rootio_web/vnv/bin/python run.py
echo "Launched run.py"

cd /Users/csik/Documents/code/rootio/rootio_telephony
source vnv/bin/activate
screen -S telephony_server.py -dm /Users/csik/Documents/code/rootio/rootio_telephony/vnv/bin/python telephony_server.py
echo "launched telephony server"

screen -S launch_stations.py -dm /Users/csik/Documents/code/rootio/rootio_telephony/vnv/bin/python launch_stations.py
echo "launched stations"

set -x #echo on
screen -ls

Loading