summaryrefslogtreecommitdiff
path: root/INSTALL
blob: f1ddf86fd44ecef0d46621346d639840c31a3bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
How to install pbot?

This is how I (Xylon) do it.

As root on server:
    useradd -rm pbot  # `r' means system user, `m' means create home dir
    su - pbot
    mkdir .ssh
    echo 'my_private_key' > authorized_keys  # Now I can administrate him
Open Thunar on my own computer and view pbot folder
Open another thunar and log it into server to view /home/pbot
    (CTRL+l and type ssh://pbot@80.87.131.232/home/pbot)
Copy over all necessary files.
    announcements/
    info/
    lib/
    logs/
    modules/
    systemd/
    transport/
    bot_settings.sh
    common_codez
    envbot
    process_event
    labs_change_detector
    pbot
    pbot-ng_fixer
Restore backup of info/ and announcements/ directories if available (Xylon
    keeps such backups).
    Copy pbot-ng_daily_backup.tar.gz onto server
    rm -r info announcements
    tar -xf pbot-ng_daily_backup.tar.gz
Now as root on the server:
    mv /home/pbot/systemd/pbot.service /usr/lib/systemd/system/
    cd /etc/systemd/system/multi-user.target.wants
    ln -s /usr/lib/systemd/system/pbot.service
    rm -r /home/pbot/systemd
Final things to do:
    Make sure /home/pbot/pbot has execute permissions
    Make sure pbot's deps are installed
        moreutils
        w3m
        recode
        inotify-tools
    Put pbot's freenode password in /home/pbot/password.secret and chmod 600
        (Xylon knows what this password is)
Test if he works:
    su - pbot
    ./pbot start  # see if there is any error.
    logout
    pkill -u pbot  # He starts a lot of child processes so they must all
                   # be killed before starting again.
Start him properly
    systemctl start pbot  # He should log into the IRC in a few seconds.
More things to do
    Make a cron job to make his backups
        su - pbot
        EDITOR=emacs crontab -e
        Add "@daily tar -czf pbot-ng_daily_backup.tar.gz info announcements"
        These backups should be downloaded somewhere daily by scp.
    See if it's possible to send un-provoked messages
        su - pbot
        echo "Don't worry everyone. The most important service is back online." >> /tmp/un-provoked-message-store
    Make sure the labs change notifications work.
        The mails should go to /home/pbot/Maildir/

XYLONOTE: Below is the original contents of this file that came with envbot:

Installing envbot
=================

Installation isn't needed, you can run it from source directory.
Installation is possible though, but not recommended.

All you have to do is to get the bot running is:
* Run:
    make
* Copy bot_settings.sh.example to bot_settings.sh
* Edit bot_settings.sh to set correct nick, IRC server, service password, and so on.
* Run:
    ./envbot

To install use something like (change the paths to fit your system):
make install DESTDIR=/ PREFIX=/home/user/envbot