mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
fix: reconstruct the script of 'make start' 'make stop' and 'make check' (#1953)
* fix: del the error world * fix: refactoring scripts * fix: del nounset * rm set error * rm set error * replace openim::log::info * replace openim::log::info * replace openim::log::info * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * fix: fix the error output format * log * fix: fix the error * log * log * fix: fi the code error * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * fix: use printf replace the echo --------- Co-authored-by: skiffer-git <44203734@qq.com>
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
package genutil
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -42,15 +41,12 @@ func OutDir(path string) (string, error) {
|
||||
}
|
||||
|
||||
func ExitWithError(err error) {
|
||||
if errors.Is(err, errors.New("SIGTERM EXIT")) {
|
||||
os.Exit(-1)
|
||||
}
|
||||
progName := filepath.Base(os.Args[0])
|
||||
fmt.Fprintf(os.Stderr, "\n\n%s exit -1: \n%+v\n\n", progName, err)
|
||||
fmt.Fprintf(os.Stderr, "%s exit -1: %+v\n", progName, err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
func SIGUSR1Exit() {
|
||||
func SIGTERMExit() {
|
||||
progName := filepath.Base(os.Args[0])
|
||||
fmt.Printf("\n\n%s receive process terminal SIGTERM exit 0\n\n", progName)
|
||||
fmt.Fprintf(os.Stderr, "Warning %s receive process terminal SIGTERM exit 0\n", progName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user