shell服务启动脚本(ssdb示例)

#!/bin/sh
case "$1" in
'start')
   /usr/local/ssdb/ssdb-server -d /usr/local/ssdb/
ssdb.conf
   echo "ssdb started."
   ;;
'stop')
   kill `cat /usr/local/ssdb/var/ssdb.pid`
   echo "ssdb stopped."
   ;;
'restart')
   kill `cat /usr/local/ssdb/var/ssdb.pid`
   echo "ssdb stopped."
   sleep 0.5
   /usr/local/ssdb/ssdb-server -d /usr/local/ssdb/
ssdb.conf
   echo "ssdb started."
   ;;
*)
   echo "Usage: $0 {start|stop|restart}"
   exit 1
;;
esac

 https://ssdb.io/docs/zh_cn/index.html

posted @ 2023-03-13 10:04  Justtosee  阅读(34)  评论(0编辑  收藏  举报