verify_install.rb - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
(HTM) git clone git://jay.scot/warvox
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
verify_install.rb (2906B)
---
1 #!/usr/bin/env ruby
2 ###################
3
4 #
5 # Load the library path
6 #
7 base = __FILE__
8 while File.symlink?(base)
9 base = File.expand_path(File.readlink(base), File.dirname(base))
10 end
11 $:.unshift(File.join(File.expand_path(File.dirname(base)), '..', 'lib'))
12 require 'warvox'
13
14 #
15 # Verify that WarVOX has been installed properly
16 #
17
18 puts("**********************************************************************")
19 puts("* *")
20 puts("* WarVOX Installation Verifier *")
21 puts("* *")
22 puts("**********************************************************************")
23 puts(" ")
24
25
26 begin
27 require 'rubygems'
28 puts "[*] RubyGems have been installed"
29 rescue ::LoadError
30 puts "[*] ERROR: The RubyGems package has not been installed:"
31 puts " $ sudo apt-get install rubygems"
32 exit
33 end
34
35 begin
36 require 'bundler'
37 puts "[*] The Bundler gem has been installed"
38 rescue ::LoadError
39 puts "[*] ERROR: The Bundler gem has not been installed:"
40 puts " $ sudo gem install bundler"
41 exit
42 end
43
44 if(not WarVOX::Config.tool_path('gnuplot'))
45 puts "[*] ERROR: The 'gnuplot' binary could not be installed"
46 puts "[*] $ sudo apt-get install gnuplot"
47 exit
48 end
49 puts "[*] The GNUPlot binary appears to be available"
50
51 if(not WarVOX::Config.tool_path('lame'))
52 puts "[*] ERROR: The 'lame' binary could not be installed"
53 puts "[*] $ sudo apt-get install lame"
54 exit
55 end
56 puts "[*] The LAME binary appears to be available"
57
58
59 if(not WarVOX::Config.tool_path('sox'))
60 puts "[*] ERROR: The 'sox binary could not be installed"
61 puts "[*] $ sudo apt-get install sox"
62 exit
63 end
64 puts "[*] The SOX binary appears to be available"
65
66
67 puts " "
68 puts "[*] Congratulations! You are almost ready to run WarVOX"
69 puts " "
70 puts "[*] Configuring the PostgreSQL database server:"
71 puts "[*] 1. Install postgresql (9.1 or newer):"
72 puts "[*] $ sudo apt-get install postgresql"
73 puts "[*]"
74 puts "[*] 2. Install postgresql community contributed modules:"
75 puts "[*] $ sudo apt-get install postgresql-contrib"
76 puts "[*]"
77 puts "[*] 3. Configure a superuser account, password, and database for WarVOX:"
78 puts "[*] $ sudo su - postgres"
79 puts "[*] $ createuser -s warvox"
80 puts "[*] $ createdb warvox -O warvox"
81 puts "[*] $ psql"
82 puts "[*] psql> alter user warvox with password 'randompass';"
83 puts "[*] psql> exit"
84 puts "[*]"
85 puts "[*] 4. Copy config/database.yml.example to config/database.yml"
86 puts "[*]"
87 puts "[*] 5. Modify config/database.yml to include the password above"
88 puts "[*]"
89 puts "[*] 6. Initialize the WarVOX database"
90 puts "[*] $ make database"
91 puts "[*]"
92 puts "[*] 7. Create a user account"
93 puts "[*] $ bin/adduser"
94 puts "[*]"
95 puts "[*] 8. Start WarVOX with bin/warvox.rb"
96 puts "[*]"
97 puts "[*] 9. Login to http://127.0.0.1:7777/"
98 puts "[*]"