Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start-stop-daemon to start redis_failover how to save log #45

Open
hamgua opened this issue Dec 18, 2012 · 0 comments
Open

start-stop-daemon to start redis_failover how to save log #45

hamgua opened this issue Dec 18, 2012 · 0 comments

Comments

@hamgua
Copy link

hamgua commented Dec 18, 2012

I try start it daemon by start-stop-daemon,because we want to see the log to know which redis is down and which tobe master!
It's ok!
But no output!
I try to add "> /var/log/redis_failover.log" into start-stop-daemon shell,but is bad!

So i think if you can add -l|--log option into redis_node_manager next version,it will so cool!

Thank you!

My start-stop-daemon shell(debian):

dev@template:/var/log$ cat /etc/init.d/redis_failover

!/bin/bash

ulimit -s 256

DAEMON=/usr/local/bin/redis_node_manager
DAEMON_OPTS="-C /etc/redis/redis_failover.yml"

PIDFILE=/var/run/goagent.pid

case "$1" in
start)
echo "Starting server"
/sbin/start-stop-daemon --start --pidfile $PIDFILE
--user root --group root
--background --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
;;
stop)
echo "Stopping server"
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --verbose
;;
restart)
echo "Restarting server"
$0 stop && $0 start
;;
*)
echo "Usage: /etc/init.d/redis_failover {start|stop|restart}"
exit 1
;;
esac

exit 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant