StartupScripts: obts_startup.sh

File obts_startup.sh, 1.2 KB (added by amilkh, 11 months ago)

Starts up OpenBTS in a FreeSWITCH configuration

Line 
1#!/bin/bash
2#Version 0.20
3#Written by Amil Khanzada (http://AmilKhanzada.com/)
4#This script is released as is. Use at your own risk.
5#Released to public domain
6#See https://wush.net/trac/rangepublic/wiki/StartupScripts
7
8echo Runs OpenBTS, FreeSWITCH, smqueue, sipauthserve, and finally OpenBTSCLI
9echo Make sure that the OBTS_ROOT and FS_ROOT variables in this script are set correctly and that your radio is attached via USB!
10
11#get sudo privileges
12sudo echo 
13
14#store FreeSWITCH and OpenBTS root locations
15OBTS_ROOT="/usr/local/src/openbts"
16FS_ROOT="/usr/local/freeswitch"
17
18#start FreeSWITCH
19cd $FS_ROOT/bin
20sudo killall freeswitch &> /tmp/tmp
21ulimit -s 240
22sleep 2s
23sudo gnome-terminal -x sh -c "sudo ./freeswitch" &
24
25
26#start smqueue and sipauthserve
27cd $OBTS_ROOT
28sudo gnome-terminal --tab -e "sudo smqueue/trunk/smqueue/smqueue" --tab -e "sudo subscriberRegistry/trunk/sipauthserve" &
29
30#start OpenBTS
31cd $OBTS_ROOT/openbts/trunk/apps
32sudo killall transceiver &> /tmp/tmp #sometimes necessary
33sudo gnome-terminal -x sh -c "sudo ./OpenBTS" &
34
35
36#finally, start the CLI
37echo ---All other processes initialized. Please wait a few seconds for FreeSWITCH to initialize---
38echo
39sudo ./OpenBTSCLI
40