don't rely on configuration for critical options, add --daemonize no in unit file
This commit is contained in:
parent
01c0789b60
commit
0e9ad48734
|
@ -9,7 +9,7 @@
|
|||
. /etc/rc.d/init.d/functions
|
||||
|
||||
name="redis-server"
|
||||
exec="/usr/sbin/$name"
|
||||
exec="/usr/bin/$name"
|
||||
pidfile="/var/run/redis/redis.pid"
|
||||
REDIS_CONFIG="/etc/redis.conf"
|
||||
|
||||
|
@ -21,7 +21,7 @@ start() {
|
|||
[ -f $REDIS_CONFIG ] || exit 6
|
||||
[ -x $exec ] || exit 5
|
||||
echo -n $"Starting $name: "
|
||||
daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG"
|
||||
daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG --daemonize yes --pidfile $pidfile"
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && touch $lockfile
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Redis persistent key-value database
|
|||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/redis-server /etc/redis.conf
|
||||
ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no
|
||||
User=redis
|
||||
Group=redis
|
||||
|
||||
|
|
Loading…
Reference in New Issue