12345678910111213141516171819202122232425 |
- #!/usr/bin/env bash
- # extra function
- ## func of log
- function log_warn() {
- local date=$(date "+%Y-%m-%d-%H:%M:%S")
- local para=$1
- echo "[WARN] $date $1"
- }
- function log_info() {
- local date=$(date "+%Y-%m-%d-%H:%M:%S")
- local para=$1
- echo "[INFO] $date $1"
- }
- function log_err() {
- local date=$(date "+%Y-%m-%d-%H:%M:%S")
- local para=$1
- echo -e "[ERROR] $date $1"
- }
- ./stop.sh no_logo "$@" && ./run.sh no_logo
- log_info "服务重启结束"
|