v3.0.0.sh 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/usr/bin/env bash
  2. git config core.ignorecase false
  3. chmod 777 /app/data/tmp -R
  4. service crond restart
  5. hostname=`hostname`
  6. domain=`php /app/bin/tools.php getDomain`
  7. port=`php /app/bin/tools.php getPort`
  8. #收款明细表名称改成票据收款统计表
  9. #curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=receiptsDetailedRename
  10. #初始化数据
  11. curl -s http://${domain}:${port}/v2/tools/init
  12. #初始化量身定制
  13. curl -s http://${domain}:${port}/v2/tools/init?key=customized
  14. #初始化机台数据
  15. curl -s http://${domain}:${port}/v2/tools/report-calculation?key=machine
  16. #转移报表密码
  17. curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=transfer_report_password
  18. #初始化财务数据
  19. curl -s http://${domain}:${port}/v2/tools/report-calculation?key=statement
  20. #初始化权限
  21. curl -s http://${domain}:${port}/v2/tools/init?key=rule
  22. #初始化机台暂停权限
  23. curl -s http://${domain}:${port}/v2/tools/init?key=machinePause
  24. #初始化机台报表数据
  25. curl -s http://${domain}:${port}/v2/tools/init?key=machine
  26. #开票收票报表数据
  27. curl -s http://${domain}:${port}/v2/tools/report-calculation?key=ticket
  28. #初始化票据销售时间
  29. curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=billOrderTime
  30. #设置内置事务
  31. curl -s http://${domain}:${port}/v2/tools/init?key=setAffairBuildin
  32. #初始化仓库同步
  33. curl -s http://${domain}:${port}/v2/tools/init?key=initWarehouseSyn
  34. #修正产品退货单票据金额
  35. curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=CPTHDBillAmount
  36. #初始化票据开票人
  37. curl -s http://${domain}:${port}/v2/tools/report-forms-data-init?key=BillUserID
  38. #调整索引
  39. curl -s http://${domain}:${port}/v2/tools/init?key=createIndex
  40. #安装wkhtmltopdf
  41. #if [ ! -x "$(command -v wkhtmltopdf)" ]; then
  42. # yum install -y urw-fonts libXext openssl-devel libXrender
  43. # wget -O /usr/share/fonts/simsun.ttc http://mi.lacecdn.com/docker/simsun.ttc
  44. # wget -O /usr/share/fonts/simfang.ttf http://mi.lacecdn.com/docker/simfang.ttf
  45. # 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
  46. # cd /tmp
  47. # tar xvfJ wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  48. # rm -rf /usr/local/wkhtmltox
  49. # mv wkhtmltox /usr/local/
  50. # chmod +x /usr/local/wkhtmltox/bin/wkhtmltopdf
  51. # chmod +x /usr/local/wkhtmltox/bin/wkhtmltoimage
  52. # ln -sf /usr/local/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
  53. # ln -sf /usr/local/wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
  54. # rm -rf /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  55. #fi
  56. #sed -i 's/^max_allowed_packet = 1M/max_allowed_packet = 16M/' /etc/my.cnf
  57. #if [ ! -f /etc/init.d/redis ];then
  58. # wget -O /etc/init.d/redis http://mi.lacecdn.com/docker/init.d.redis
  59. # chmod +x /etc/init.d/redis
  60. # service redis start
  61. # chkconfig redis on
  62. #fi
  63. #if [ -z `php -m | grep imagick` ];then
  64. # echo | pecl install imagick
  65. #fi
  66. sed -i -e '/^# wiredTiger:/a\ engineConfig:\n\ cacheSizeGB: 0.25' -e 's/^# wiredTiger:/ wiredTiger:/' /etc/mongod.conf
  67. sync; echo 3 > /proc/sys/vm/drop_caches
  68. systemctl restart mongod