1 Star 6 Fork 8

ilxna/kongkongxiyou

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
uploadremote.command 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
linyouhappy 提交于 2016-07-20 13:01 . first commit
CURRENT_DIR=`dirname $0`
SOURCE_DIR=$CURRENT_DIR/lordofpomelo
TMP_DIR=$CURRENT_DIR/publicResource/remote_tmp
TARGET_ZIP=$CURRENT_DIR/publicResource/remote.zip
rm -rf $TMP_DIR
mkdir $TMP_DIR
GAME_SERVER=$TMP_DIR/game-server
mkdir $GAME_SERVER
cp -R $SOURCE_DIR/game-server/app $GAME_SERVER
cp -R $SOURCE_DIR/game-server/config $GAME_SERVER
cp -R $SOURCE_DIR/game-server/node_modules $GAME_SERVER
cp -R $SOURCE_DIR/game-server/scripts $GAME_SERVER
cp $SOURCE_DIR/game-server/app.js $GAME_SERVER
cp $SOURCE_DIR/game-server/package.json $GAME_SERVER
WEB_SERVER=$TMP_DIR/web-server
mkdir $WEB_SERVER
cp -R $SOURCE_DIR/web-server/config $WEB_SERVER
cp -R $SOURCE_DIR/web-server/lib $WEB_SERVER
cp -R $SOURCE_DIR/web-server/node_modules $WEB_SERVER
cp -R $SOURCE_DIR/web-server/views $WEB_SERVER
cp -R $SOURCE_DIR/web-server/public $WEB_SERVER
cp $SOURCE_DIR/web-server/app.js $WEB_SERVER
cp $SOURCE_DIR/web-server/package.json $WEB_SERVER
cp -R $SOURCE_DIR/shared $TMP_DIR
cp $SOURCE_DIR/create_database.sh $TMP_DIR
cp $SOURCE_DIR/startserver.sh $TMP_DIR
cp $SOURCE_DIR/kill_node_app.sh $TMP_DIR
cp $SOURCE_DIR/startclient.sh $TMP_DIR
cp $SOURCE_DIR/removelog.sh $TMP_DIR
REMOTE_SSH=pomelo1
cd $TMP_DIR
zip -r $TARGET_ZIP ./*
scp $TARGET_ZIP $REMOTE_SSH:/root
rm -rf $TMP_DIR
rm -rf $TARGET_ZIP
#read -p "need stop remote server?(y/n)n:" REMOTE_MASK
#
#if ["$REMOTE_MASK" ]; then
#if [ $REMOTE_MASK = "y" ] ; then
# ssh $REMOTE_SSH "kill -9 `ps -ef|grep node | awk '{print $2}'`"
#fi
#fi
#read -p "need delete /root/lordofpomelo?(y/n)n:" REMOTE_MASK
#if ["$REMOTE_MASK" ]; then
#if [ $REMOTE_MASK = "y" ] ; then
# ssh $REMOTE_SSH "rm -rf /root/lordofpomelo;"
#fi
#ssh pomelo1 "unzip -d /root/lordofpomelo /root/remote.zip;rm -rf /root/remote.zip"
#
#else
ssh pomelo1 "unzip -d /root/lordofpomelo /root/remote.zip;rm -rf /root/remote.zip"
#fi
#read -p "need start remote servers?(y/n)n:" REMOTE_MASK
#if ["$REMOTE_MASK" ]; then
#if [ $REMOTE_MASK = "y" ] ; then
#ssh $REMOTE_SSH "cd /root/lordofpomelo/;./startserver.sh daemon"
#fi
#fi
#ssh pomelo1 "cd /root/lordofpomelo/;./startserver.sh daemon"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ilxna/kongkongxiyou.git
git@gitee.com:ilxna/kongkongxiyou.git
ilxna
kongkongxiyou
kongkongxiyou
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385