Browse Source

refactor:优化脚本

王智勇 4 years ago
parent
commit
f233ab74d7
1 changed files with 13 additions and 0 deletions
  1. 13 0
      start.sh

+ 13 - 0
start.sh

@@ -0,0 +1,13 @@
+#!/bin/sh
+# 设置hexo 项目路径
+BLOG_PATH=/home/pi/code/blog
+cd $BLOG_PATH
+git pull
+sleep 5
+hexo clean
+sleep 1
+#	 nohup hexo server >hexo-blog.log 2>&1 &
+hexo g
+cp -f robots.txt public/robots.txt
+systemctl restart nginx
+echo 'start success !'