Skip to content

Instantly share code, notes, and snippets.

@walterrenner
Forked from philippeowagner/config.ini
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterrenner/4d8863043404bec01d0f to your computer and use it in GitHub Desktop.
Save walterrenner/4d8863043404bec01d0f to your computer and use it in GitHub Desktop.
Install the 3bot worker on your machine
[3bot-settings]
BOT_ENDPOINT=*
#!/bin/bash
function install {
mkdir -p ~/3bot-worker/
echo "Creating new virtualenv"
virtualenv --no-site-packages ~/3bot-worker/
cd ~/3bot-worker/
. ./bin/activate
echo "Installing 3bot-worker packages"
pip install -e git+https://github.com/3bot/3bot-worker.git@0.0.2#egg=theebot_worker
# clear any previous sudo permission
sudo -k
# run inside sudo
echo "Please enter your administration password"
sudo sh <<SCRIPT
mkdir -p /etc/3bot/
curl -# -o /etc/3bot/config.ini https://gist.githubusercontent.com/walterrenner/4d8863043404bec01d0f/raw/config.ini
touch /etc/3bot/3bot.log
chmod 666 /etc/3bot/config.ini
chmod 666 /etc/3bot/3bot.log
SCRIPT
read -p "ENTER PORT: " port
read -p "ENTER SECRET_KEY: " secret_key
echo $'\n' >> /etc/3bot/config.ini
echo "PORT=$port" >> /etc/3bot/config.ini
echo "SECRET_KEY=$secret_key" >> /etc/3bot/config.ini
cd src/theebot-worker/threebot_worker
echo "Starting the worker Daemon"
python worker.py start
}
install < /dev/tty
@walterrenner
Copy link
Author

3bot-worker Installation and Quick Start

  • make sure you have virtualenv, pip and python-dev installed.
  • Download and install 3bot-worker by running the following command in your shell or Terminal:

curl -# https://gist.githubusercontent.com/walterrenner/4d8863043404bec01d0f/raw/install.bash | bash

@walterrenner
Copy link
Author

Debian Issues

I had some issues on Debian installing pyzmq, which is required by the 3bot-worker.

gcc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command 'gcc' failed with exit status 1

I installed g++ by running sudo apt-get install g++ and the installation finished successfully.

source: http://www.ducea.com/2007/10/25/gcc-error-trying-to-exec-cc1plus-execvp-no-such-file-or-directory/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment