Tag:networking database database local
#!/bin/sh#author:taokey#date:2016-05-06#chkconfig: 345 85 15#description: Redis is a persistent key-value database#processname: redis-server#config: /etc/redis/6379.conf#config: /var/redis#pidfile: /var/ Redis/run/redis_6379.pid#source networking configuration. /etc/sysconfig/network#check that networking is up. [ "$NETWORKING" = "no" ] && exit 0redis= "/usr/local/bin/ Redis-server "cli="/usr/local/bin/redis-cli "prog=$ (basename $redis) arog=$ (basename $CLI) REDIS_CONF_ File= "/etc/redis/6379.conf" pidfile= "/var/redis/run/redis_6379.pid" [ -f /var/redis ] & & . /var/redislockfile=/var/lock/subsys/redisstart () { [ -x $redis ] | | exit 5 [ -f $REDIS _conf_file ] | | exit 6 echo $ "Starting $prog:" $redis $REDIS _conf_file retval=$? echo [ $retval -eq 0 ] && touch $lockfile return $retval}stop () { echo " stopping $prog: " $CLI &Nbsp;shutdown Retval=$? if [ -f $pidfile ] then kill $pidfile retval=$? else echo "$prog shutdown" >/dev/null 2>&1 fi echo [ $retval -eq 0 ] && rm -f $lockfile return $retval}restart () { Stop start }case "$" in start) start ;; stop) stop ;; &Nbsp; restart) restart ;; *) echo $ "Usage: $0 {start|stop|restart}" exit 2esac
This article from the "Years in the passing, shining still in" blog, please be sure to keep this source http://taokey.blog.51cto.com/4633273/1770848
Redis Database Startup scripts