Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move some scripts to the community-scripts repo

  • Loading branch information...
commit 635f5377d4bc11ae9be9b80a1113ab77997ef394 1 parent d6ca3b3
@k-anderson k-anderson authored
View
37 scripts/caption.log
@@ -1,37 +0,0 @@
-1288717187|v1.00
-1313533127|v1.37
-1314829616|v1.38
-1315613625|v1.39
-1317147755|v1.40
-1317771780|v1.41
-1319673637|v1.42
-1321301547|v1.43
-1323127524|v1.44
-1325096256|v1.46
-1326768011|v1.47
-1327719260|v1.48
-1329195413|v1.49
-1330478338|v1.50
-1331753582|v1.51
-1334606879|v1.52
-1336093614|v1.53
-1337706907|v1.54
-1339461529|v1.55
-1340642429|v1.56
-1342632695|v1.57
-1344907947|v2.00
-1346781606|v2.01
-1347315579|v2.02
-1348609637|v2.03
-1349746374|v2.04
-1351730520|v2.05
-1352148702|v2.06
-1353376410|v2.07
-1357773708|v2.08
-1360108155|v2.09
-1361301078|v2.10
-1362278031|v2.11
-1363710323|v2.12
-1365442855|v2.13
-1369514944|v2.14
-1372827219|v3.0
View
6 scripts/dbs_for_compaction.sh
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-SIZE="100M"
-
-ssh $1 "find /srv/db/shards/ -size +$SIZE -exec ls -s {} \;" | sort -n | awk -F "/" '{printf "%s/%s/%s/%s\n", $6,$7,$8,$9}' | awk -F "." '{printf "%s\n", $1}' | uniq
-
View
38 scripts/git_remove_ignored.sh
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-fWelcome() {
- clear
- echo "======================================================="
- echo " _ _ _ _ _ _____ _ _______ _ _______ "
- echo "| || || | | | (_____) | | (_______) | (_______)"
- echo "| || || | |__ | | _ \ \ _ | | _____ "
- echo "| ||_|| | __)| | | | \ \| | | | | ___) "
- echo "| |___| | | | |_| |_ _____) ) |_____| |_____| |_____ "
- echo " \______|_| |_(_____|______/ \______)_______)_______)"
- echo " - - - Signaling the start of next generation telephony"
- echo "======================================================="
- echo
-}
-
-fFindIgnoredFiles() {
- while read file; do
- fGitRm ${file}
- done < <(find ../$1 2> /dev/null)
-}
-
-fGitRm() {
- git ls-files --error-unmatch "$1" 2> /dev/null || return 0
-
- echo "# git rm --cached $1"
- git rm --cached $1
-}
-
-cd `dirname $0`
-
-fWelcome
-
-while read ignore; do
- fFindIgnoredFiles ${ignore}
-done < ../.gitignore
-
-echo "All ignored files removed from git, please commit any changes now."
View
259 scripts/platform_status.sh
@@ -1,259 +0,0 @@
-#!/bin/bash
-
-OPENSIPS="your.whapps.server.here.com other.whapps.server.if.any"
-FREESWITCH="fs1.com fs2.com fs3.com fs4.com"
-ECALLMGR=$OPENSIPS
-RABBITMQ=$OPENSIPS
-WHAPPS=$OPENSIPS
-HAPROXY=$OPENSIPS
-BIGCOUCH="db01.server.com db02.server.com db03.server.com db04.server.com"
-CROSSBAR=$OPENSIPS
-WEBSERVERS=$OPENSIPS
-
-
-function select_zone {
- echo -n "Please select a zone you wish to manage [default=1]:"
- read ZONE
- echo "Zone $ZONE selected."
- echo
-}
-
-function gather_servers {
- # NOTE: I want to replace this with a curl command or other local file read to get a list of all theoretically configured servers.
- # Suggestions welcome.
-
- # Get the list of OpenSIPs servers
-
- # Get the list of FreeSWITCH servers
-
- # Get the list of RabbitMQ servers
-
- # Get the list of ECallmgr servers
-
- # Get the list of WhApps servers
-
- # Get the list of HaProxy servers
-
- # Get the list of BigCouch servers
-
- # Get the list of API URLs
-echo ""
-}
-
-function check_active() {
- port=$1
- shift;
- servers=$@
- working=0
- failed=0
-
- for server in $servers
- do
- if nc -z $server $port > /dev/null 2>&1
- then
-# echo $server port $port is open/working
- working=$((working+1))
- else
-# echo $server port $port is not open
- failed=$((failed+1))
- fi
- done
-
- if [ $working -gt 0 ] && [ $failed -gt 0 ]; then
- result=" \Z2$working OK/\Z1$failed WARN"
- elif [ $working -gt 0 ]; then
- result=" \Z2$working ONLINE\Zn"
- else
- result=" \Z1$failed OFFLINE"
- fi
-
- echo "$result"
-}
-
-echo "Checking OpenSIPs..."
-osips_status=$(check_active 5060 $OPENSIPS)
-echo
-
-echo "Checking FreeWITCH Nodes..."
-frees_status=$(check_active 5060 $FREESWITCH)
-#echo $(check_active 8031 $FREESWITCH)
-echo
-
-echo "Checking eCallMgr Nodes..."
-# How can we do this?
-ecall_status=" UNKNOWN"
-echo
-
-echo "Checking RabbitMQ Nodes..."
-rabmq_status=$(check_active 5672 $RABBITMQ)
-echo
-
-echo "Checking WhApps Nodes..."
-# How can we do this?
-whapp_status=" UNKNOWN"
-echo
-
-echo "Checking HAProxy Availability..."
-hapro_status=$(check_active 15984 $HAPROXY)
-#echo $(check_active 15986 $HAPROXY)
-echo
-
-echo "Checking Database (BigCouch) Nodes..."
-bigco_status=$(check_active 5984 $BIGCOUCH)
-#echo $(check_active 5986 $BIGCOUCH)
-echo
-
-echo "Checking API Nodes..."
-cross_status=$(check_active 8000 $CROSSBAR)
-whapp_status=$cross_status
-echo
-
-echo "Checking Web Servers..."
-httpd_status=$(check_active 80 $WEBSERVERS)
-#echo $(check_active 443 $WEBSERVERS)
-echo
-
-echo "Checking Winkstart Status..."
-winks_status=" UNKNOWN"
-#
-echo
-
-
-# Need to add a check that OpenSIPs is connected to X nodes
-# Need to add a check that FreeSWITCH has X ecallmgrs
-# Need to add a check that of what whapps are running
-
-title="Zone 1 (US) / Cluster 1 (Dallas)"
-
-output="\n\
-\Zn SIP Stack Status 2600hz Platform Web Service Status \n\
-\Zn-------------------------------- -------------------------------- --------------------------------\n\
-\Zn OpenSIPs = $osips_status eCallMgr = $ecall_status HTTP Server = $httpd_status \n\
-\Zn FreeSWITCH = $frees_status RabbitMQ = $rabmq_status Winkstart = $winks_status \n\
-\Zn Activity = CALLS WhApps = $whapp_status API Server = $cross_status \n\
-\Zn Devices = REG'D HaProxy = $hapro_status\n\
-\Zn BigCouch = $bigco_status\n\
-\Zn\n
-\n
-"
-# Security Status System Services\n\
-#--------------------------- --------------------------- ---------------------------\n\
-# IPTables = ONLINE Postfix = ONLINE\n\
-# Fail2ban = ONLINE\n\
-#"
-
-dialog --colors --no-collapse --title "$title" \
- --msgbox "$output" \
- 30 107
-
-exit
-
-
-# Goal: To display all elements below, from a single server
-#
-
-# Configured OpenSIPs Servers
-# Connected OpenSIPs Servers
-# Responding OpenSIPs Servers
-# Running Version
-
-
-# Configured FS Servers
-# Connected FS Servers
-#Responding FS Servers
-#Run a FS Command
-#Running Version
-
-
-#Configured Whapps
-#Running Whapps
-#Running Version
-
-
-#Configured Databases
-#Connected Databases
-#Running Database
-#Running Version
-
-
-# Goal: To allow access to these commands from the CLI:
-
-# Submenu: System Config Maintenance
-# 1) Clear System Cache -- wh_cache:flush().
-# 2) Reload System Configuration -- whapps_config:flush().
-# 3) Run system upgrade maintenance routine, after a version upgrade (whapps_maintenance:migrate())
-# 4) Check what Couch & AMQP we are actually connected to amqp_mgr:get_host().
-
-
-# Submenu: Application Maintenance
-# 1) Running WhApps
-# 2) Start a WhApp
-# 3) Stop a WhApp (whapps_controller:stop/start_app(xxx).)
-
-
-# Submenu: Database Maintenance
-# 1) Verify database connectivity on all nodes (check curl http://db.server:5986/_membership all matches on all servers, and haproxy.cfg is working)
-# 2) Add a new database node to the cluster (curl again!)
-# 3) Move an account to a different database server (curl replication fanciness)
-# 4) Backup an account (curl again! should allow "all")
-# 5) Restore an account (curl again! should allow "all" but with warnings, lots of warnings)
-
-
-# Submenu: Device Maintenance
-# 1) View registered devices known by this machine (registrar_maintenance:local_summary().)
-# Note: It is not required that this machine know about every device, only that at least one machine in the cluster knows a device
-# 2) Check for registration of a specific device across the cluster
-# 3) Flush device attribute cache (callflow_maintenance:flush(). <- the attributes cache, like CID)
-# 4) Flush device registration cache {ok, Cache} = registrar_sup:cache_proc()
-
-
-# Submenu: Active Call Management
-# 1) Show Calls on entire cluster (callflow_maintenance:show_calls().)
-# 2) Show Calls on specific call management server (#ecallmgr_maintenance:show_calls().)
-# 3) callflow_maintenance:flush(). what does this do?
-
-
-# Submenu: Number Management Maintenance
-# 1) Rebuild inbound phone number database -- whistle_number_manager_maintenance:reconcile(). (allow specific account)
-# 2) Verify where an inbound phone number routes to (stepswitch_maintenance:lookup_number("+14158867900").
-# 3) Verify where an outbound phone number routes to (stepswitch_maintenance:process_number("+12127229901").
-# 4) Reload global number routes/resources (stepswitch_maintenance:reload_resources().)
-# 5) Clear in-memory cache of number routing for recently called numbers (stepswitch_maintenance:flush())
-
-
-# Submenu: API Maintenance
-# 1) View API status
-# 2) Generate API key
-# 3) Start an API module (enabling API access for a specific command set) (crossbar:start_mod(cb_noauthz).)
-# 4) Stop an API module (disabling API access for a specific command set) (crossbar:stop_mod(cb_noauthz).)
-
-
-# Submenu: Account Maintenance
-# 1) Create a new account
-# 2) Check status of an account
-# 3) Toggle account enabled/disabled
-# 4) Rebuild views for an account (whapps_maintenance:refresh(). or whapps_maintenance:refresh('account_id')
-
-
-
-# Command Bridge:
-# whapps_config:get(<<"whapps_controller">>, <<"whapps">>).
-# kanderson: command_bridge whapps_config flush
-# [7:20pm] kanderson: or if you were running it on your laptop...
-# [7:20pm] kanderson: command_bridge -c whatever_the_cookie_is -h apps001-aa-ord.2600hz.com whapps_config flush
-# [7:20pm] kanderson: or to start crossbar
-# [7:20pm] kanderson: command_bridge -c whatever_the_cookie_is -h apps001-aa-ord.2600hz.com whapps_controller start_app crossbar
-# [7:20pm] kanderson: see running apps
-# [7:21pm] kanderson: command_bridge -c whatever_the_cookie_is -h apps001-aa-ord.2600hz.com whapps_controller running_apps
-# [7:21pm] kanderson: see what should be running
-# [7:21pm] kanderson: command_bridge -c whatever_the_cookie_is -h apps001-aa-ord.2600hz.com whapps_config whistle_apps whapps
-# [7:21pm] kanderson: see what fs nodes should be connected
-# [7:21pm] kanderson: command_bridge -c whatever_the_cookie_is -h apps001-aa-ord.2600hz.com -n ecallmgr ecallmgr_config get fs_nodes
-# [7:22pm] kanderson: OH sorry the previsous was wrong
-# [7:22pm] kanderson: command_bridge -c whatever_the_cookie_is -h apps001-aa-ord.2600hz.com whapps_config get whistle_apps whapps
-# [7:24pm] kanderson: actually just tried the listing of whistle apps that should be running (as config'd in the db) and it was still wrong, should have been
-# [7:24pm] kanderson: ./command_bridge -c change_me whapps_config get whapps_controller whapps
-# command_bridge wh_number_manager reconcile_number Number AccountId
-
-command_bridge crossbar_maintenance create_account AccountName Realm Username Password
-
View
0  scripts/git_setup.sh → scripts/setup-git.sh
File renamed without changes
View
2  scripts/visualize-commits.sh
@@ -1,2 +0,0 @@
-#!/bin/bash
-gource -1280x720 --highlight-all-users --file-filter ".*\.beam" --user-scale 2 --file-extensions --seconds-per-day .5 --auto-skip-seconds .5 --file-idle-time 0 -hide bloom,dirnames,filenames,mouse --date-format "%B %e, %G" --camera-mode overview --caption-file caption.log --caption-size 26 --caption-duration 5
Please sign in to comment.
Something went wrong with that request. Please try again.