修改安装和启动方法

数据库表更新更新两个字段
This commit is contained in:
郝大全
2017-06-30 16:56:01 +08:00
parent 4d8e647523
commit 1300ca1a8b
4 changed files with 41 additions and 10 deletions

BIN
PPGo_Job Executable file

Binary file not shown.

View File

@@ -8,5 +8,5 @@ PPGo_Job
1、go get github.com/george518/PPGo_Job
2、创建mysql数据库并将ppgo_job.sql导入
3、修改config 配置数据库
4、运行 go install main.go
5、运行 PPGo_Job
4、运行 go build
5、运行 ./run.sh start|stop

File diff suppressed because one or more lines are too long

30
run.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# @Author: haodaquan
# @Date: 2017-06-29 17:44:45
# @Last Modified by: haodaquan
# @Last Modified time: 2017-06-29 17:44:45
case $1 in
start)
nohup ./PPGo_Job 2>&1 >> info.log 2>&1 /dev/null &
echo "服务已启动..."
sleep 1
;;
stop)
killall PPGo_Job
echo "服务已停止..."
sleep 1
;;
restart)
killall PPGo_Job
sleep 1
nohup ./PPGo_Job 2>&1 >> info.log 2>&1 /dev/null &
echo "服务已重启..."
sleep 1
;;
*)
echo "$0 {start|stop|restart}"
exit 4
;;
esac