diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-09-21 08:27:25 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-09-21 08:27:25 +0200 |
commit | e6733b88c58b2919f50e995e06dfe761f8df2a09 (patch) | |
tree | c7ad314cfde888b952573c503fbb116536079341 /redis.init | |
parent | d132734cbd05cba6d0c04348f931dfad41b929e3 (diff) |
redis: fix/improve service management
Diffstat (limited to 'redis.init')
-rw-r--r-- | redis.init | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -10,6 +10,7 @@ name="redis-server" exec="/usr/bin/$name" +shut="/usr/bin/redis-shutdown" pidfile="/var/run/redis/redis.pid" REDIS_CONFIG="/etc/redis.conf" @@ -30,8 +31,16 @@ start() { stop() { echo -n $"Stopping $name: " - killproc -p $pidfile $name + [ -x $shut ] && $shut retval=$? + if [ -f $pidfile ] + then + # shutdown haven't work, try old way + killproc -p $pidfile $name + retval=$? + else + success "$name shutdown" + fi echo [ $retval -eq 0 ] && rm -f $lockfile return $retval |