Initialize Git Repository: 'WSDD'
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Additional arguments for wsdd can be provided here.
|
||||
# Use, e.g., "-i eth0" to restrict operations to a specific interface
|
||||
# Refer to the wsdd(8) man page for details
|
||||
|
||||
WSDD_PARAMS="--shortlog --chroot='/run/wsdd'"
|
||||
WSDD_DISCOVERY_PARAMS="--shortlog --chroot='/run/wsdd' --source-port='37020' --no-host --discovery"
|
||||
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: wsdd
|
||||
# Required-Start: $local_fs $network $remote_fs
|
||||
# Required-Stop: $local_fs $network $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Web Services Dynamic Discovery host daemon
|
||||
# Description: Web Services Dynamic Discovery (WSDD) host daemon
|
||||
### END INIT INFO
|
||||
|
||||
|
||||
NAME='wsdd'
|
||||
DESC='Web Services Dynamic Discovery host daemon'
|
||||
USER='wsdd'
|
||||
GROUP='wsdd'
|
||||
PIDFOLDER="/run/${NAME}"
|
||||
PIDFILE="${PIDFOLDER}/${NAME}.pid"
|
||||
DAEMON='/usr/sbin/wsdd'
|
||||
DAEMON_CONFIG='/etc/default/wsdd'
|
||||
|
||||
set -e
|
||||
|
||||
[ -f "${DAEMON_CONFIG}" ]
|
||||
|
||||
. /etc/default/${NAME}
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
[ -x "${DAEMON}" ]
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
/usr/bin/install --directory --group="${GROUP}" ---mode='0755' --owner="${USER}" "${PIDFOLDER}"
|
||||
log_daemon_msg "Starting ${DESC}" "${NAME}"
|
||||
if /usr/sbin/start-stop-daemon --quiet \
|
||||
--start \
|
||||
--background \
|
||||
--make-pidfile \
|
||||
--pidfile "${PIDFILE}" \
|
||||
--user "${USER}" \
|
||||
--group "${GROUP}" \
|
||||
--exec "${DAEMON}" -- "${WSDD_PARAMS}"; then
|
||||
log_end_msg 0
|
||||
else
|
||||
log_end_msg 1
|
||||
/usr/bin/test -f "${PIDFILE}" && \
|
||||
/usr/bin/rm --force "${PIDFILE}"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
log_daemon_msg "Stopping ${DESC}" "${NAME}"
|
||||
if /usr/sbin/start-stop-daemon --quiet \
|
||||
--stop \
|
||||
--retry 30 \
|
||||
--remove-pidfile \
|
||||
--pidfile "${PIDFILE}" \
|
||||
--user "${USER}" \
|
||||
--group "${GROUP}" \
|
||||
--exec "${DAEMON}"; then
|
||||
/usr/bin/test -f "${PIDFILE}" && \
|
||||
/usr/bin/rm --force "${PIDFILE}"
|
||||
log_end_msg 0
|
||||
else
|
||||
log_end_msg 1
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
"${0}" stop
|
||||
"${0}" start
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}" && \
|
||||
exit 0 || \
|
||||
exit "${?}"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user