Domino Multi-account auto-start under Linux environment

Source: Internet
Author: User

#! /bin/sh

#

# A startup script for the ND server

# Description:this script is used to start the Domino server as a background process.

# Usage/etc/init.d/domino Start|stop

??

# You should the 3 following variables to reflect your environment.

??

# Dom_home is the variable that tells the script where the Domino Data resides

Dom_home=/local/notesdata

??

# Dom_user is the Linux account used to run the ND server

Dom_user=notes

??

# Dom_prog is the location of the Domino executables

Dom_prog=/opt/lotus/bin

??

# start:this is executed if you launch the Command/etc/init.d/domino START

Start () {

Echo-n "Starting Domino:"

??

# when the Domino Controller runs, it creates a. jsc_lock file.

# If You ' ve configured Domino to use the Domino Controller and the Server crashes then the ". Jsc_lock" file was not deleted .

# when the system reboots and starts Domino, it'll fail because of the existing. jsc_lock file.

# Here we want to ensure that we delete the file if it ' s there before Domino starts

If [-f $DOM _home/.jsc_lock]; Then

RM $DOM _home/.jsc_lock

Fi

CD $DOM _home

??

# The script must is launched by root.

# Here we become the Notes user and we launch the Domino Server with the Domino Controller (-JC) enabled.

# to launch the Server without Domino Controller with the line:

# su $DOM _user-c "$DOM _prog/server >/dev/null 2>&1 &"

# Start Domino as a background process

Su $DOM _user-c "$DOM _prog/server-jc-c >/dev/null 2>&1 &"

return 0

}

??

# stop:this is executed if you launch the Command/etc/init.d/domino STOP

Stop () {

Echo-n "Stopping Domino:"

CD $DOM _home

# Here we become the notes user and we quit the Domino Server and the Domino Controller (-JC).

# to stop Domino, the Domino Controller is not enabled with the line:

# su $DOM _user-c "$DOM _prog/server-q"

# We Pipe the Y into the command so Domino was shut down without needing to type ' Y ' on the terminal.

echo Y | Su $DOM _user-c "$DOM _prog/server-jc-q"

return 0

}

??

Case "$" in

Start

Start

;;

Stop

Stop

;;

*)

echo "Usage:domino {start|stop}"

Exit 1

Esac

???

Use Note:

-Copy the document to/etc/init.d/domino

-Check that the document owner (owner) must be root

-Check that the document properties are correct and set mode to 744

-Start/Stop Domino server available command line:/etc/init.d/domino Start (stop)

-If you want to run Domino automatically, you can create a script link in the R0-R6 run level, as follows:

??

Now, create symlinks to start the Domino server at Runlevels 3 and 5 with thefollowing commands:

Ln-s/etc/rc.d/init.d/domino/etc/rc.d/rc3.d/s95domino

Ln-s/etc/rc.d/init.d/domino/etc/rc.d/rc5.d/s95domino

and create symlinks to stop the server at Runlevels 1 (single-user), 0 (Halt) and 6 (reboot) with the following commands:

Ln-s/etc/rc.d/init.d/domino/etc/rc.d/rc1.d/k01domino

Ln-s/etc/rc.d/init.d/domino/etc/rc.d/rc0.d/k01domino

Ln-s/etc/rc.d/init.d/domino/etc/rc.d/rc6.d/k01domino?

Domino Multi-account auto-start under Linux environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.