NOTE: init script is already provided with Fedora DS 1.1 and later
On linux and Solaris the init script is already provided and installed in the correct place. On linux, you will still have to run
chkconfig fedora-ds on
to make fedora-ds start at boot time.
The following information is for 1.0.x and earlier versions only.
SysV Init scripts for Fedora DS
- I tried to utilize whenever possible or sensible the existing scripts in /opt/fedora-ds/slapd-*
- The script iterates over each slapd server id.
- The script does not cleanly fit into the existing model of service manangement as provided by the /etc/init.d/functions utility code. This is due to the following factors:
- we're controlling multiple "services" but pretending its one
- the slapd process is not named for the slapd instance (most of the init.d utility code assumes a correspondence between service name and process name)
- the pid location and interpretation is non-standard
- fedora ds has its own startup and shutdown scripts
- The script treats all slapd servers as a member of the FedoraDirectoryServer service. It lists each slapd server it is operating on in a list. The return code is the first non-zero return code for a slapd server. If any slapd server has a non-zero return code the failing slapd servers are listed seperately.
- There was no status script in /opt/fedora-ds/slapd-* therefore I copied the logic for testing status from start-slapd. The status is based on the "pid" file, its does not look at the "startpid" file. The reasoning is the pid file is valid when the slapd server is available to service clients, the "boot" period represented by startpid is not likely to be an interesting metric of running status.
- The script fully supports start,stop,restart,reload,condrestart,status
- We've initially installed the script as FedoraDirectoryServer
- The chkconfig start/kill ordering numbers probably need to be adjusted.
- The whole service control mechanism is going to be reworked in an upcoming release. This script represents a temporary stop gap. Reworking the service control mechanism probably makes sense because as outlined above the existing mechanism is a bit of a square peg in a round hole.
Init Scripts for Suse 9/10
Then, after downloading the files:
chmod 755 fedora-ds cp fedora-ds /etc/init.d/ ln -s /etc/init.d/fedora-ds /usr/sbin/rcfedora-ds
Edit /etc/init.d/fedora-ds and change APP_NAME var value to name of you application, and enable the service in yast or in console.
chkconfig fedora-ds on
chmod 755 fedora-ds-admin cp fedora-ds-admin /etc/init.d/ ln -s /etc/init.d/fedora-ds-admin /usr/sbin/rcfedora-ds-admin
And enable the service in yast or in console
chkconfig fedora-ds-admin on