# shellcheck shell=ksh # 本机包管理器快捷方式 alias pkg="brew" alias sea="pkg search " alias ins="pkg install -y " alias ser='pkg services' # pm2 守护线程 alias pmstart='pm2 start ' alias pmdown='pm2 del ' alias pmstop='pm2 stop ' alias pmr='pm2 restart ' alias pml='pm2 log --lines 100 ' # 重启 pm2 服务配置 alias pmrr='pm2 resurrect' pmup() { _worker_name=$1 pms "$_worker_name" && pml "$_worker_name" } pmrun() { _cmd=$1 _name=$2 if [ -n "$_name" ]; then pmst -x "$_cmd" --name "$_name" else pmst -x "$_cmd" fi } pms() { _worker_name=$1 pmr "$_worker_name" && pml "$_worker_name" }