Skip to content

Instantly share code, notes, and snippets.

@RickyVaughn2
Last active May 1, 2019 15:35
Show Gist options
  • Save RickyVaughn2/083a22581da57641f3150e3a4f41cc50 to your computer and use it in GitHub Desktop.
Save RickyVaughn2/083a22581da57641f3150e3a4f41cc50 to your computer and use it in GitHub Desktop.
This is a simple bash file to setup a system to run comet.
#you must have comet131 in /home/alerttech/Downloads
#run the following command:
#sudo visudo
#add the following to the bottom of the file
#alerttech ALL=(ALL) NOPASSWD:ALL
sudo apt install curl -y
sudo apt install git -y
git clone https://github.com/eclipse/paho.mqtt.c.git
sudo apt install libssl-dev -y
cd paho.mqtt.c
make
sudo make install
cd ~/Downloads
sudo apt-get install git-core -y
sudo apt-get update
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
#change the following lines to the version of comet that you are using
sudo chmod +x ~/Downloads/comet131
cd ~/Downloads
sudo ./comet131
#comet should be running now and it should have created both files in the home directory
#once it has, kill comet and continue
#this will change ownership of the parms and log files so that you can edit them easily
sudo usermod -a -G dialout alerttech
sudo chown -R alerttech /home/alerttech
@RickyVaughn2
Copy link
Author

Also, you may have to run line 34 manually as it can take comet awhile to create the files and this command may miss them.

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