v3.0.0.sh 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. #安装wkhtmltopdf
  37. #if [ ! -x "$(command -v wkhtmltopdf)" ]; then
  38. # yum install -y urw-fonts libXext openssl-devel libXrender
  39. # wget -O /usr/share/fonts/simsun.ttc http://mi.lacecdn.com/docker/simsun.ttc
  40. # wget -O /usr/share/fonts/simfang.ttf http://mi.lacecdn.com/docker/simfang.ttf
  41. # 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
  42. # cd /tmp
  43. # tar xvfJ wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  44. # rm -rf /usr/local/wkhtmltox
  45. # mv wkhtmltox /usr/local/
  46. # chmod +x /usr/local/wkhtmltox/bin/wkhtmltopdf
  47. # chmod +x /usr/local/wkhtmltox/bin/wkhtmltoimage
  48. # ln -sf /usr/local/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
  49. # ln -sf /usr/local/wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
  50. # rm -rf /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  51. #fi
  52. #sed -i 's/^max_allowed_packet = 1M/max_allowed_packet = 16M/' /etc/my.cnf
  53. #if [ ! -f /etc/init.d/redis ];then
  54. # wget -O /etc/init.d/redis http://mi.lacecdn.com/docker/init.d.redis
  55. # chmod +x /etc/init.d/redis
  56. # service redis start
  57. # chkconfig redis on
  58. #fi
  59. #if [ -z `php -m | grep imagick` ];then
  60. # echo | pecl install imagick
  61. #fi