75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# OPENDJ SERVICE SCRIPT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Common Development and Distribution License, Version 1.0 only
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# (the "License"). You may not use this file except in compliance
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# with the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at
3acf5eb97cebc2ba868e6ac4a4e01e6d1be0c892Automatic Updater# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# trunk/opendj3/legal-notices/CDDLv1_0.txt. If applicable,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# add the following below this CDDL HEADER, with the fields enclosed
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# by brackets "[]" replaced with your own identifying information:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright 2013 ForgeRock AS
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# chkconfig: 2345 80 05
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# description: Starts and stops opendj LDAPv3 service.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein### BEGIN INIT INFO
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Provides: opendj
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Required-Start:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Required-Stop:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Default-Start: 2 3 4 5
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Default-Stop: 0 1 6
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Short-Description: This is the opendj daemon
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Description: OpenDJ is an LDAPv3 compliant directory service, developed for the Java
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# platform, providing a high performance, highly available and secure store
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# for the identities managed by enterprises. Its easy installation process,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# combined with the power of the Java platform makes OpenDJ one of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# simplest and fastest directory servers to deploy and manage.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein### END INIT INFO
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updater# Set up source function library depending on the distribution
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews # Other dist.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Sets the script vars
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Original PID file
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Pid file is a symlink to /opt/opendj/log/server.pid
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If the daemon is not there, then exit / LSB return code.
727f5b8846457a33d06f515a10a7e1aa849ddf18Andreas Gustafssontest -x "$INSTALL_ROOT/bin/start-ds" || exit 5
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# /var/run is deleted after reboot (eg. debian)
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# recreates the symlink if needed.
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updatertest -h "$PIDFILE" || ln -s $ORIGINPIDFILE $PIDFILE
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#Starts the server and creates pid file.
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater#Stops the server and removes pid file.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Displays the service status
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein # Not implemented.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo $"Usage: /etc/init.d/$DAEMON {start|restart|stop|force-reload|status}"