Search

Mobile tag

About Me

I am the "IBM Collaboration & Productivity Advisor" for IBM Asia Pacific. I'm based in Singapore.
Reach out to me via:
Follow notessensei on Twitter
(posts)
Skype
Sametime
IBM
Facebook
LinkedIn
XING
Amazon Store
Amazon Kindle

Twitter

Domino Upgrade

VersionSupport end
5.0
6.0
6.5
7.0
Upgrade to 8.5x now!
(see the full Lotus lifcyle) To make your upgrade a success use the Upgrade Cheat Sheet.
Contemplating to replace Notes? You have to read this! (also available on Slideshare)

Languages

Other languages on request.

Visitors

Useful Tools

Get Firefox
Use OpenDNS
The support for Windows XP is coming to an end and has . Time to consider an alternative to move on. sounds like a lot of time, but, like an object in a mirror, it is closer than you think.

« Creating Notes 8.5.3++ plug-ins with Eclipse 4.2 | Main| How much effort will you spend on old browsers? »

Starting Domino on Linux using UPSTART

QuickImage When running Domino on a proper platform (AIX, Solaris, Linux) starting and stopping the Domino server was left to customizing a script from a technote or a Redbook's FTP site, as far as official IBM resouces go. Of course the professional source is Daniel Nashed's ultimate Domino startup script. One script to rule them all.
On Linux however the way services are started has changed a while ago. The prefered method (definitely in Ubuntu, but also Fedora, RedHat and OpenSuse as option) is Upstart (there seems to be a push towards systemd, but that's a story for another time).
Upstart allows for a more flexible control and faster boot times of your environment. To configure your Domino on Linux we will use 2 scripts and one configuration file for each instance (inspired by the same approach for node.js).
The first file is /etc/init/domino.conf with the following content:
# Sample job script for domino, experimental - use at your own risk, don't use in production
description 'lotus domino upstart script'
author '@notessensei'

#Stop on shutdown - but no start directive - since it gets started by another script
stop on shutdown

#Instance allows for multiple scripts running
instance "Domino - $NAME"

# Restart if it was crashing, with a limit
respawn
respawn limit 5 60

# Will go into the background
expect fork

# Kill timeout 20 sec - to give Domino a shutdown chance
kill timeout 20

# Check for the password file
pre-start script
    . /etc/domino/$NAME.conf
    # Ensure the pwd file is there and has the right owner/access
    if [ ! -f $PWD_LOCATION ]; then
        touch PWD_LOCATION
    fi
    chmod 0400 $PWD_LOCATION
    chown $SERVER_USER:$SERVER_GROUP $PWD_LOCATION
end script

# The script to start the server
script
    . /etc/domino/$NAME.conf
    exec sudo -u $SERVER_USER -c "cd ${DATA_LOCATION}; cat ${PWD_LOCATION}|PWD_LOCATION/server" >> $LOG_TO 2>&1 &
end script

# Run before shutdown - tell Domino to go down peacefully
pre-stop script
     . /etc/domino/$NAME.conf
    exec sudo -u $SERVER_USER -c "cd ${DATA_LOCATION}; /opt/ibm/lotus/bin/server -q"
end script

# Make sure it is really dead
post-stop script
    . /etc/domino/$NAME.conf
    exec sudo -u $SERVER_USER -c "cd ${DATA_LOCATION}; /opt/ibm/lotus/bin/nsd -kill"
end script
Secondly you create the configuration file in /etc/domino/server1.conf (you need to create the directory if needed, it isn't there by default):
#Configuration variables for Domino instance startup
#User and group for Domino
SERVER_USER="domino"
SERVER_GROUP="domino"
#Where does the data go
DATA_LOCATION="/home/domino/server1/data"
#Must exist and have 0400 doe SERVER_USER:SERVER_GROUP
PWD_LOCATION="${DATA LOCATION}/.domino.pwd"
#Log file
LOG_TO="${DATA LOCATION}/domino.log"
The script will be able to start the domino instance using start domino NAME=server1. For additional instances (partitioned servers) you only need to create an additional conf file in /etc/domino.
The final missing piece is the script that starts all the configured instances. Here we can more or less copy Ian's node script as /etc/init/alldomino.conf:
description 'Start all domino instances at boot'
author '@notessensei'

start on (local-filesystems and net-device-up)

task

script
  for file in `ls /etc/domino/*.conf` ; do
    filename=`basename ${file%.*}`
    start domino NAME=$filename
  done
end script
That's all you need. As usual YMMV.

Post A Comment

Please note: Comments without a valid and working eMail address will be removed. This is my site, so I decide what stays here and what goes.

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)

Disclaimer

This site is in no way affiliated, endorsed, sanctioned, supported, nor enlightened by Lotus Software nor IBM Corporation. I may be an employee, but the opinions, theories, facts, etc. presented here are my own and are in now way given in any official capacity. In short, these are my words and this is my site, not IBM's - and don't even begin to think otherwise. (Disclaimer shamelessly plugged from Rocky Oliver)
© 2003 - 2013 Stephan H. Wissel - some rights reserved as listed here: Creative Commons License
Unless otherwise labeled by its originating author, the content found on this site is made available under the terms of an Attribution/NonCommercial/ShareAlike Creative Commons License, with the exception that no rights are granted -- since they are not mine to grant -- in any logo, graphic design, trademarks or trade names of any type. Code samples and code downloads on this site are, unless otherwise labeled, made available under an Apache 2.0 license. Other license models are available on written request and written confirmation.