#!/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
标签:shell,示例,ssdb,pid,echo,usr,local From: https://www.cnblogs.com/justtosee/p/17210407.html