/etc/init.d/swift-object-replicator is in swift-object 2.2.0-1+deb8u1.
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 | #! /bin/sh
### BEGIN INIT INFO
# Provides: swift-object-replicator
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Swift object replicator server
# Description: Object replicator server for swift.
### END INIT INFO
set -e
SERVICE_NAME="swift-object-replicator"
DAEMON="/usr/bin/${SERVICE_NAME}"
DAEMON_ARGS="/etc/swift/object-server.conf"
PRINT_NAME="Swift object replicator"
SWIFT_USER=swift
SWIFT_GRP=swift
PID_FILE=/var/run/swift/${SERVICE_NAME}.pid
PID_DIR=`dirname $PID_FILE`
if ! [ -x "${DAEMON}" ] ; then
exit 0
fi
if ! [ -r "${DAEMON_ARGS}" ] ; then
echo "No configuration file found in ${DAEMON_ARGS}: exiting"
exit 0
fi
mkdir -p ${PID_DIR}
chown ${SWIFT_USER} ${PID_DIR}
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting ${PRINT_NAME}" "${SERVICE_NAME}"
start-stop-daemon --start --chuid ${SWIFT_USER}:${SWIFT_GRP} -b -m --pidfile $PID_FILE --exec ${DAEMON} -- ${DAEMON_ARGS}
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping ${PRINT_NAME}" "${SERVICE_NAME}"
start-stop-daemon --stop --oknodo --pidfile ${PID_FILE}
log_end_msg $?
;;
restart|force-reload|reload)
$0 stop
sleep 1
$0 start
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 1
;;
esac
exit 0
|