1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #!/usr/bin/env bash
- git config core.ignorecase false
- chmod 777 /app/data/tmp -R
- service crond restart
- hostname=`hostname`
- domain=`php /app/bin/tools.php getDomain`
- port=`php /app/bin/tools.php getPort`
- #收款明细表名称改成票据收款统计表
- #curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=receiptsDetailedRename
- #初始化数据
- curl -s http://${domain}:${port}/v2/tools/init
- #初始化量身定制
- curl -s http://${domain}:${port}/v2/tools/init?key=customized
- #初始化机台数据
- curl -s http://${domain}:${port}/v2/tools/report-calculation?key=machine
- #转移报表密码
- curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=transfer_report_password
- #初始化财务数据
- curl -s http://${domain}:${port}/v2/tools/report-calculation?key=statement
- #初始化权限
- curl -s http://${domain}:${port}/v2/tools/init?key=rule
- #初始化机台暂停权限
- curl -s http://${domain}:${port}/v2/tools/init?key=machinePause
- #初始化机台报表数据
- curl -s http://${domain}:${port}/v2/tools/init?key=machine
- #开票收票报表数据
- curl -s http://${domain}:${port}/v2/tools/report-calculation?key=ticket
- #初始化票据销售时间
- curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=billOrderTime
- #设置内置事务
- curl -s http://${domain}:${port}/v2/tools/init?key=setAffairBuildin
- #初始化仓库同步
- curl -s http://${domain}:${port}/v2/tools/init?key=initWarehouseSyn
- #修正产品退货单票据金额
- curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=CPTHDBillAmount
- #初始化票据开票人
- curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=BillUserID
- #调整mongodb数据结构
- curl -s http://${domain}:${port}/v2/tools/v3-to-v32
- #调整索引
- curl -s http://${domain}:${port}/v2/tools/init?key=createIndex
- #安装wkhtmltopdf
- #if [ ! -x "$(command -v wkhtmltopdf)" ]; then
- # yum install -y urw-fonts libXext openssl-devel libXrender
- # wget -O /usr/share/fonts/simsun.ttc http://mi.lacecdn.com/docker/simsun.ttc
- # wget -O /usr/share/fonts/simfang.ttf http://mi.lacecdn.com/docker/simfang.ttf
- # wget -O /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz http://mi.lacecdn.com/docker/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
- # cd /tmp
- # tar xvfJ wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
- # rm -rf /usr/local/wkhtmltox
- # mv wkhtmltox /usr/local/
- # chmod +x /usr/local/wkhtmltox/bin/wkhtmltopdf
- # chmod +x /usr/local/wkhtmltox/bin/wkhtmltoimage
- # ln -sf /usr/local/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
- # ln -sf /usr/local/wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
- # rm -rf /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
- #fi
- #sed -i 's/^max_allowed_packet = 1M/max_allowed_packet = 16M/' /etc/my.cnf
- #if [ ! -f /etc/init.d/redis ];then
- # wget -O /etc/init.d/redis http://mi.lacecdn.com/docker/init.d.redis
- # chmod +x /etc/init.d/redis
- # service redis start
- # chkconfig redis on
- #fi
- #if [ -z `php -m | grep imagick` ];then
- # echo | pecl install imagick
- #fi
- sed -i -e '/^# wiredTiger:/a\ engineConfig:\n\ cacheSizeGB: 0.25' -e 's/^# wiredTiger:/ wiredTiger:/' /etc/mongod.conf
- sync; echo 3 > /proc/sys/vm/drop_caches
- systemctl restart mongod
|