hangoutsbot

https://github.com/hangoutsbot/hangoutsbot


下記にサービスとしての利用方法もある・・・が、昨晩コケてた。
プロセスの監視が必要な様だ。
https://github.com/hangoutsbot/hangoutsbot/blob/master/examples/hangoutsbot.sh

# 6. Once you have done that, hangoutsbot will start automatically at boot.
# You can also start it manually by running
# sudo /etc/init.d/hangoutsbot start
# Or stop it manually by running
# sudo /etc/init.d/hangoutsbot stop
# Or restart it (to reload the configuration file) by running
# sudo /etc/init.d/hangoutsbot restart

#!/bin/sh

PID=`ps aux | grep hangupsbot.py | grep -v grep | awk '{print $2}'`
if [ "${PID}" = "" ] ; then
echo "bot not alive... starting bot."
sudo /etc/init.d/hangoutsbot start
echo "process started at `date`" | mail boxcar2@example.com -s "[bot] Started"
else
#echo "bot alive."
fi

的な?