/etc/init.d/mysql-mmm-agent is in mysql-mmm-agent 2.2.1-1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | #! /bin/sh
### BEGIN INIT INFO
# Provides: mmm_agentd
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: MMM Agent Daemon
# Description: Debian init script for the mysql-mmm agent daemon
### END INIT INFO
set -e
. /lib/lsb/init-functions
# Cluster name (it can be empty for default cases)
CLUSTER=''
DESC='MMM Agent Daemon'
NAME='mmm_agentd'
PIDFILE="/var/run/mmm_agentd.pid"
DAEMON="/usr/sbin/mmm_agentd"
ARGS=''
ENABLED=0
test -f /etc/default/mysql-mmm-agent && . /etc/default/mysql-mmm-agent
if [ "$ENABLED" = "0" ]; then
log_action_msg "$DESC disabled, see /etc/default/mysql-mmm-agent"
exit 0
fi
if [ "$CLUSTER" != "" ]; then
DAEMON="/usr/sbin/mmm_agentd"
PIDFILE="/var/run/mmm_agentd-$CLUSTER.pid"
NAME="mmm_agentd-$CLUSTER"
ARGS="@$CLUSTER"
fi
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
if pidofproc -p $PIDFILE $NAME >/dev/null; then
log_progress_msg "already running"
log_end_msg 0
exit 0
fi
$DAEMON $ARGS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE; then
log_end_msg 0
else
log_end_msg 1
fi
;;
status)
status_of_proc $NAME "$NAME" && exit 0 || exit $?
;;
restart|force-reload)
$0 stop
$0 start
exit $?
;;
*)
log_action_msg "Usage: $0 {start|stop|restart|force-reload|status}"
exit 1
;;
esac
exit 0
|