OpenVzにインストールしてみた。
OpenVz特有の対応
eth0
ではなくvenet0:0
だったりするので
/usr/local/aipo/bin/install.conf
- netitf=eth0
+ netitf=venet0:0
OS起動とともに自動起動
/home/owner/bin/aipowatch.sh
AIPO_PROC_COUNT=`ps -ef | grep aip[o] | grep -v aipowatch.sh | wc -l`
LOGFILE=/home/owner/aipo.log
if [ $AIPO_PROC_COUNT -eq 0 ];then
cd /usr/local/aipo/bin/
sudo sh startup.sh >> $LOGFILE
fi
cronに登録
crontab -l owner
@reboot /home/owner/bin/aipowatch.sh
* * * * * /home/owner/bin/aipowatch.sh
トラブルシューティング
postgresが起動していない場合、セッションがタイムアウトしました。
と表示される。
cronでsudoできない場合、cronの実行時間微調整, @reboot - Qiita参照