halo/deploy.sh

24 lines
439 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/bin/bash
# 指定Halo的根目录请按实际修改
HALO_DIR="/www/wwwroot/halo"
# 拉取最新的源码
# git pull
# 进入Halo根目录
cd $HALO_DIR
# 停止Halo
sh $HALO_DIR/bin/halo.sh stop
# 执行打包
mvn package -Pprod
# 进入打包好的Halo目录
cd $HALO_DIR/target/dist/halo
# 运行Halo
nohup java -server -Xms256m -Xmx512m -jar `find ./ -name "halo*.jar"` > /dev/null 2>&1 &
echo "Halo部署完毕Enjoy"