#!/bin/sh # ### BEGIN INIT INFO # Short-Description: Monitor virtual services provided by LB-Dienst.sh # Provides: lb_dienst # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO # # Author: Yoda # # init script for LB-Dienst.sh # PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" NAME=LB_Dienst.sh DAEMON="/root/bin/$NAME" CONFIG="" test -x $DAEMON || exit 0 test -x /var/lock/subsys || mkdir -p /var/lock/subsys . /lib/lsb/init-functions CONFIG_FILE="" #[ -f "$CONFIG" ] && . "$CONFIG" #CONFIG_FILE="${CONFIG_FILE:=/etc/ldirectord.cf}" test -f ${CONFIG_FILE} RC=$? if [ $RC -ne 0 ] ; then log_warning_msg "No configuration file found, doing nothing." exit 0 fi case "$1" in start|stop|restart|reload|halt|status) log_daemon_msg "Running $NAME" "$1" ##exec "$DAEMON" "$CONFIG_FILE" $1 exec "$DAEMON" $1 RC=$? log_end_msg $RC exit $RC ;; *) echo "Usage: /etc/init.d/$NAME" \ "{start|restart|reload|stop|halt|status}" >&2 exit 1 ;; esac