init.d file for mydumper

Asked by Pavel Stratil


I ran into issues with the daemon mode when trying to write an init file for it. Is there a way to let mydumper create its pid file? Also is there a shutdown command for the daemon with the given pid?

Thanks, Pavel

Question information

English Edit question
MySQL Data Dumper Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andrew Hutchings (linuxjedi) said :

Hi Pavel,

I apologise for the delay, I have been on vacation.

That is a great question, I have filed a bug report so that I can make this happen.

Revision history for this message
Pavel Stratil (pavel-senbonzakura) said :

cool thanks :) I've packaged mydumper for Gentoo, so for now it will go into tree once reviewed without init scripts, once resolved here, I'll just write some ...

Revision history for this message
HighKing (esz-ei6h3l-n1h) said :

I ran into the same issue. I have created a simple initscript (on a CentOS 6 machine) that does not check a pidfile so simply kills the process named "mydumper".

# mydumper
# chkconfig: - 65 35
# description: Start the mydumper daemon
# processname: mydumper

# Source function library.
. /etc/rc.d/init.d/functions

args="-D -c -o ~/mysql_exports"

start() {
  echo -n $"Starting $name: "
  daemon --user $user $cmd $args

stop() {
  echo -n $"Stopping $name: "
  killproc $name

case $1 in
    echo "Usage: $0 {start|stop|restart}"
    exit 1

Can you help with this problem?

Provide an answer of your own, or ask Pavel Stratil for more information if necessary.

To post a message you must log in.