大米CMS官网论坛,大米站长联盟,大米站长之家,大米开发者社区

 找回密码
 注册大米会员

QQ登录

只需一步,快速开始

查看: 5529|回复: 0
打印 上一主题 下一主题

magento2发布linu简单脚本mage.sh

[复制链接]

498

主题

775

帖子

7639

积分

超级版主

Rank: 8Rank: 8

积分
7639

授权用户

跳转到指定楼层
楼主
发表于 2018-7-13 14:49:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. #!/bin/bash

  2. action=$1
  3. root_path=/www/wwwroot/cn-pricerite-magento2

  4. if [ "${action}" == "clean" ];then
  5.     rm -rf ${root_path}/pub/static/frontend
  6.     rm -rf ${root_path}/var/view_preprocessed/pub/static/frontend
  7.     php ${root_path}/bin/magento cache:clean
  8. elif [ "${action}" == "upgrade" ];then
  9.     php ${root_path}/bin/magento setup:upgrade
  10. elif [ "${action}" == "compile" ];then
  11.     php /home/website/magentoee220/bin/magento setup:di:compile
  12. elif [ "${action}" == "deploy" ];then
  13.     php ${root_path}/bin/magento setup:static-content:deploy -f en_US
  14.     php ${root_path}/bin/magento setup:static-content:deploy -f zh_Hant_HK
  15. elif [ "${action}" == "chown" ];then
  16.     chown -R www:www ${root_path}
  17. elif [ "${action}" == "chmod" ];then
  18.     chmod -R 777 ${root_path}
  19. else
  20.     php ${root_path}/bin/magento ${action}
  21. fi
复制代码


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册大米会员

本版积分规则

QQ|小黑屋|大米CMS社区 ( 蜀ICP备11002200号-2广告联系:广告联系 

Powered by 大米CMS

© 2010-2020 大米CMS Inc.

快速回复 返回顶部 返回列表