@@ -10,41 +10,60 @@ $ secure_mysql_setup
1010
1111$ mysql -uroot -p
1212
13- CREATE DATABASE skagbot 
14- CREATE USER 'skagbot '@'localhost';
15- GRANT ALL ON skagbot .* to 'skagbot '@'localhost';
16- SET PASSWORD for 'skagbot '@'localhost' = PASSWORD('l0lzb4lls! ');
13+ CREATE DATABASE $MYSQL_DATABASE 
14+ CREATE USER '$MYSQL_USERNAME '@'localhost';
15+ GRANT ALL ON $MYSQL_DATABASE .* to '$MYSQL_USERNAME '@'localhost';
16+ SET PASSWORD for '$MYSQL_USERNAME '@'localhost' = PASSWORD('$MYSQL_PASSWORD ');
1717
1818$ sudo -u $user
1919$ vi .my.cnf (create .my.cnf)
2020$ exit
2121
22+ DSN LINE IS:   'dsn' => ['DBI:mysql:database=$MYSQL_DATABASE;host=localhost', '$MYSQL_USERNAME', '$MYSQL_PASSWORD', {}, { 'quote_names' => 1 }],
23+ 
24+ 
2225# INSTALL PERL DEPS
2326
2427$ cpanm Bot::BasicBot DBIx::Class JSON Net::Twitter DBD::mysql DateTime::Format::MySQL DateTime JSON Hailo Date::Parse Text::Aspell URI::Find HTML::TreeBuilder::XPath JSON::XS HTTP::Tiny WWW::Wunderground::API File::Cache SQL::Translator Hail Text::
2528
2629# git clone
27- 
30+ git clone https://github.com/MattDees/GeckBot.git 
2831
2932# Install mysql schema
3033perl create_scemas.pl
31- mysql freenode_towele dbscriptdir/GeckBot-Logger-0.2-MySQL.sql
34+ mysql freenode_towele < dbscriptdir/GeckBot-Logger-0.2-MySQL.sql
35+ 
36+ # copy script
37+ 
38+ cp geckbot.pl.sample mybot.pl
3239
33- dsn is:
34-   'dsn' => ['DBI:mysql:database=freenode_towele;host=localhost', 'towele', 'l0lzb4lls!', {}, { 'quote_names' => 1 }],
3540
41+ # edit config 
42+ The config is stored in the .pl file itself:
3643
44+ $ vi mybot.pl
3745
38- # edit config file
3946required fields to edit:
4047
41-   #plugin specific configs:
42-     WUNDERGOURND:
43-       wunderground_api => { 'key' => '8f48ff94176c5427' },
48+   server => "irc.freenode.net",
49+   channels => ["#geckbot"],
50+   nick      => "skagbot",
51+   'dsn' => ['DBI:mysql:database=$MYSQL_DATABASE;host=localhost', '$MYSQL_USERNAME', '$MYSQL_PASSWORD', {}, { 'quote_names' => 1 }],
52+ 
53+ 
54+ #plugin specific configs:
55+     Weather:
56+       wunderground_api => { 'key' => ' WUNDERGROUND API KEY ' },
4457    Reddit:
4558      reddit_config => {
4659        '#geckbot' => 'funny',
4760      },
4861    Hailo:
4962      'hailo' => { brn_path => 'towel-e-new.brn' },
5063
64+ 
65+ # RUN THE BOT
66+ If you incantations have been correct, this should get your bot running
67+ 
68+ $ perl mybot.pl
69+ 
0 commit comments