Built motion from commit 6e01242c4.|1.0.20
[motion.git] / scripts / post-merge.sh
1 #!/bin/bash
2
3 echo "post-merge started"
4 cd /var/opt/motion
5
6 echo "npm install --production"
7 env CC=/opt/rh/devtoolset-3/root/usr/bin/gcc CXX=/opt/rh/devtoolset-3/root/usr/bin/g++ npm install --production
8
9 echo "sequelize"
10 sequelize db:migrate --migrations-path server/migrations --config server/config/environment/dbconf.json --env production
11
12 echo "sequelize-history"
13 sequelize db:migrate --migrations-path server/migrations-history --config server/config/environment/dbconf.json --env production
14
15 echo "tigerdial-update"
16 tigerdial-update
17
18 echo "install motion_safe"
19 curl --silent --location https://provisioning.xcally.com/files/packages/motion/motion_safe/install_safe | bash
20
21 echo "add rtp_xcally configuration file"
22 RTP_FILE=/etc/asterisk/rtp.conf
23 RTP_XCALLY_FILE=/etc/asterisk/rtp_xcally.conf
24 touch $RTP_XCALLY_FILE
25 chmod 666 $RTP_XCALLY_FILE
26 if ! grep -q rtp_xcally $RTP_FILE; then
27   echo 'Include extensions file...'
28   echo '#include "rtp_xcally.conf"' >> $RTP_FILE
29 fi
30
31 rm -f /etc/logrotate.d/motion
32
33 echo "post-merge finished"