2018-08-22 15:39:18 -05:00
|
|
|
#!/bin/sh
|
2018-08-21 18:57:27 -05:00
|
|
|
INSTALL_PATH=$PWD
|
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
# apt-get install sopel nginx certbot
|
|
|
|
|
|
|
|
# install json (to save)
|
|
|
|
cp $INSTALL_PATH/spaceapi.json /var/www/html/spaceapi.json
|
|
|
|
chown pi:pi /var/www/html/spaceapi.json
|
|
|
|
|
|
|
|
# install mini-website
|
|
|
|
cp $INSTALL_PATH/www/index.html /var/www/html/index.html
|
|
|
|
|
|
|
|
# install ircbot
|
2018-08-22 15:39:18 -05:00
|
|
|
ln -s $INSTALL_PATH/sopel-bot/modules /home/pi/.sopel
|
|
|
|
if [ ! -f /home/pi/.sopel/default.cfg ]; then
|
|
|
|
cp $INSTALL_PATH/sopel-bot/default.cfg /home/pi/.sopel/
|
|
|
|
fi
|
2018-08-21 18:57:27 -05:00
|
|
|
|
|
|
|
#install services
|
2018-08-22 15:39:18 -05:00
|
|
|
cp $INSTALL_PATH/systemd/schalter.service /etc/systemd/system
|
|
|
|
cp $INSTALL_PATH/systemd/ircbot.service /etc/systemd/system
|
2018-08-21 18:57:27 -05:00
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable ircbot schalter
|
|
|
|
systemctl start ircbot schalter
|