summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Graham <joseph@fibreglass.tunachunks>2014-09-30 12:04:05 +0100
committerJoseph Graham <joseph@fibreglass.tunachunks>2014-09-30 12:04:05 +0100
commit630bf31114838a3eb67929ef35146857f3ef6828 (patch)
treeb763f5592233563c20eb8d62ed76e9103c59b04d
parentde8a6bbcf2b6df2ec671eda7d64b3fede7e4d7cb (diff)
Wrote installation instructions.
Made him not try to run the labs change detector since labs is down.
-rw-r--r--INSTALL64
-rwxr-xr-x[-rw-r--r--]pbot5
-rwxr-xr-xpbot-ng_fixer3
3 files changed, 68 insertions, 4 deletions
diff --git a/INSTALL b/INSTALL
index 15e67a6..d107626 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,66 @@
-XYLONOTE: This file was an original part of envbot and has not been kept up to date.
+How to install pbot?
+
+This is how I (Xylon) do it.
+
+As root on server:
+ useradd -rm pbot
+ 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
+ hack_of_all_hacks
+ 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
+ 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
+
+XYLONOTE: Below is the original contents of this file that came with envbot:
Installing envbot
=================
diff --git a/pbot b/pbot
index a619241..94ab925 100644..100755
--- a/pbot
+++ b/pbot
@@ -12,8 +12,9 @@ then
./pbot-ng_fixer &
pids[1]=$!
- ./labs_change_detector &
- pids[2]=$!
+# The following commented because labs is down
+# ./labs_change_detector &
+# pids[2]=$!
function closedown
{
diff --git a/pbot-ng_fixer b/pbot-ng_fixer
index b7ae075..b02440c 100755
--- a/pbot-ng_fixer
+++ b/pbot-ng_fixer
@@ -19,6 +19,7 @@ do
cd /home/pbot
./envbot &
- ./labs_change_detector &
+# The following commented because labs is down
+# ./labs_change_detector &
fi
done