| | |
| | | if [ -f /etc/redhat-release ] ; then |
| | | # Redhat |
| | | . /etc/init.d/functions |
| | | LOCKFILE=/var/lock/subsys/opendj |
| | | elif [ -f /etc/SuSE-release ] ; then |
| | | # SuSE |
| | | . /etc/rc.status |
| | | LOCKFILE=/var/run/rcopendj |
| | | elif [ -f /etc/lsb-release ] ; then |
| | | # Debian |
| | | . /lib/lsb/init-functions |
| | | LOCKFILE=/var/lock/opendj |
| | | elif [ -f /etc/init.d/functions.sh ] ; then |
| | | # Other dist. |
| | | . /etc/init.d/functions.sh |
| | | LOCKFILE=/tmp/unused-lockfile-opendj |
| | | fi |
| | | # LOCKFILE is used by the service subsystem to know whether the opendj service is started and act upon it |
| | | |
| | | |
| | | # Sets the script vars |
| | |
| | | echo "Instance is not configured. Please run $INSTALL_ROOT/setup" |
| | | return 1 |
| | | fi |
| | | |
| | | echo -n "Starting $DAEMON: " |
| | | # Server is running |
| | | if [ -e $PIDFILE ] ; then |
| | |
| | | "$INSTALL_ROOT"/bin/start-ds --quiet |
| | | RETVAL=$? |
| | | if [ $RETVAL = 0 ] ; then |
| | | touch $LOCKFILE |
| | | echo "> SUCCESS." |
| | | else |
| | | echo "> FAILURE." |
| | |
| | | else |
| | | echo "> FAILURE." |
| | | fi |
| | | rm -f $LOCKFILE |
| | | echo "" |
| | | return $RETVAL |
| | | else |