SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm not a linux expert by any means, but I searched high and low for decent Domino startup scripts for my Slackware installation (10.0 as of this post) with very little success. I've been a supporter of the Slackware project since 3.6 and I've used this forum frequently over my Slackware tenure.
I'm simply posting this because someone might find it useful. Just trying to return to the community what it has done for me for several years.
After scowering the IBM forums, I was able to find a script someone had written for Redhat (I think), but it didn't quite work for my Slackware. The minted Domino 6.5 CD doesn't include any way for you to autostart the server, so you need to not only create a startup script, but you also need to add it to the mutliuser and shutdown scripts.
This script assumes you've already created the user and group for notes to use when it runs, so you'll already have the /home/notes directory. You might also need to edit the file locations, as I installed Domino in /usr/lotus and I installed the data directory to /usr/notes/data (because of the way my disk is partitioned).
Here's the rc.domino script that I used in /etc/rc.d (the original script was written by someone else, but I couldn't find the author's name so I can't give him/her credit):
Code:
#!/bin/sh
#
# Start/stop the Lotus Domino server
#
# description: This script is used to start and stop the domino
# server as a background process. It will send
# the serverID password from a file to the server.
# Communication with the server may be done with a screen -r -D Domino when logged in as user 'notes'
#
# Usage: domino start|stop
#
#
#
domino_start() {
echo -n "Starting Domino server..."
su - notes -c "screen -d -m -S Domino /home/notes/startnotes"
echo "done."
}
domino_stop() {
echo -n "Stopping Domino server. "
su - notes -c "cd /usr/notes/data; /usr/lotus/bin/server -q"
}
case "$1" in
'start')
domino_start
;;
'stop')
domino_stop
;;
*)
esac
# End of the domino script
Place this script in /etc/rc.d, then chmod 755 rc.domino.
Next, in your /home/notes directory, create this file named startnotes. I just used "pico startnotes." Again, you might also need to edit to accomdate the locations of your files:
Code:
cd /usr/notes/data
/usr/lotus/bin/server
chmod 755 startnotes
Next, you're going to need to edit the multiuser startup script /etc/rc.d/rc.M(the file linux runs when it goes multiuser):
I added these lines right under the lines for Samba. It probably doesn't matter where you put them, so long as it comes AFTER where shared library links are updated:
Code:
# Start Domino
if [ -x /etc/rc.d/rc.domino ]; then
. /etc/rc.d/rc.domino start
fi
Save and exit /etc/rc.d/rc.M, then you need to make one final change to /etc/rc.d/rc.6, the shutdown script. Again, I added these lines right after Samba, although it probably doesn't make a huge difference so long as you shut down Domino before it starts to shutdown your hardware:
Code:
# Stop the Domino server:
if [ -x /etc/rc.d/rc.domino ]; then
. /etc/rc.d/rc.domino stop
fi
That's it. Once all of that was in place, my Domino starts and stops when it is supposed to. These are pretty basic scripts, it doesn't provide any extravagant crash recovery data (at least I don't think so). If anyone has any changes or corrections where I may have made an error (and I bet there is), feel free to say so!
I'm not really sure what the advantage is to using rc.local over rc.M. If you could fill me on that, I'd appreciate it!
About grep, good idea. I did some research and came up with this:
Code:
domino_start() {
#check to see if Domino is already started
if ps -aux | grep -q 'startnotes' ; then
echo "Domino already running."
else
echo -n "Starting Domino server..."
su - notes -c "screen -d -m -S Domino /home/notes/startnotes"
echo "done."
fi
}
domino_stop() {
#check to see if Domino is started
if ps -aux | grep -q 'startnotes' ; then
echo -n "Stopping Domino server."
su - notes -c "cd /usr/notes/data; /usr/lotus/bin/server -q"
else
echo "Domino is not running."
fi
}
Let me know if you think that needs to be changed any, and then I'll edit the original post for reference. That seemed to work OK on my system. Sometimes, it would detect something when Domino isn't running and would execute the shutdown process anyway. This doesn't really matter that much, the 'server -q' command is pretty quick about getting back on track if it's not running. I decided to use 'startnotes' as the search in my grep process because the actual process name is 'server' which is pretty vague. By using the file you created in /home/notes to determine which server you started, you could easily swap out the names in each script to detect multiple server instances (if you're using them) and make sure they're all shut down.
Location: Sherbrooke, Quebec, Canada, North America, World, Milky Way
Distribution: Gentoo
Posts: 103
Rep:
It looks good.
I thing I used before is to use PID files. I'd put a file in /var/run at startup and do my operations based on if the files is there or not. You're way is just as good
There is nothing wrong with modifying rc.M, but the point of rc.local is for the admin to add his own scripts into the init process without having to modify the standard scripts. Of course I usually need to go in to the various scripts and comment out some stuff anyway.
Hmm, well... I've had some minor problems with this script. grep is not reliably returning the proper results.
Sometimes, it was including the grep process which includes my search string. When looped back into itself, it will always pass the check, so it never does anything. To try and avert this, I changed it to:
Code:
ps -aux | grep -w startnotes | grep -v grep
This works better, but still 'blips' sometimes and returns a false statement. I'm thinking a PID file might be more appropriate, but I'm not really sure how to do that. If you could post an example, I would appreciate it.
Just out of interest, how do you install Domino on Slackware? That is to say, IBM ship Domino CDs for Redhat and United Linux distros IIRC
Did you use the RPM files on install CD or do are the install files shipped with their own installer? (like Mozilla)
Sorry it's a bit of topic. We run Domino on Win32 where I work and I'd be interested in investigating it on Linux at some point. Especially if I can use Slackware!
Just extract the tar file and put it in the directory you want to install it in. Do a google for "Domino power Linux" and you'll get an article from 1999-2000 describing the steps. Unlike most other IBM products Domino does not use RPM or require that you run a specific flavor of Linux. That is unless this changed with 6.5.1. Last time I did a fresh install was about 3 years ago, so someone else may be able to give you better directions. R5 was a little touchy running on Linux but R6 is doing fairly well for us. If you need SameTime or quickplace though keep in mind there is not a Linux version at this time. (Maybe R8, but that is just an educated guess.)
Note that the Domino Power article is hopelessly out of date. For one thing I know if you do the install from X you get a gui install interface and don't have to do an http install. I just don't know of any more recent tutorials. If you have done Domino installs in windows though it is basically the same. The main difference is the command line for launching Domino.
Hmm, the company I work for has an "IBM Passport Advantage" and we have two server licenses. On the 'passport,' they send you the entire CD set every time there's an updated release. There's two CDs for Linux, but neither have any kind of RPM package that I saw. It has it's own installer deal. One of the Linux CDs is for the IBM zSeries server something-or-other.
The installer is text-based and can be done from a remote console pretty easily. You can set it up to do anything you wish, pretty much. If you want my advice, I'd install the server from the text-based installer, than set it up to be configured with Remote Server Setup. Do the server setup from a Windows box with Notes installed - you'll get better control over all the setup functions.
If you don't want to get the passport thing, I'm pretty sure you can pay a one-time fee and get the CD you need. You can get updates through the next major release from their web site for free.
If you want or need help with getting it installed and working, I'll do my best to help you. I'm no expert, I'm just one of those guys who has gotten it to work.
We ran Domino on Windows servers for years, and as time passed, I became increasingly disappointed in Domino's speed. As a seat-of-the-pants move, I brought in my fresh Slackware 10 CDs and slapped that on an old 566 MHz machine I had sitting around. Domino runs faster and better on that 566 that it ever did on any of the dual-processor Dell boxes we have.
As far as the startup scripts go, I've stripped them back to the plain and simple launch commands with no grep. Domino is smart enough to know that it's already started and won't continue to launch if you try to run it again while it's already running. It's the same with trying to shut it down if it's not running. Therefore I don't really see a need to grep out the process.
Well, as I said above, Domino knows if it's being launched twice and just returns a quick error before quitting out. You can throw the server -q switch at it if it's already shut down and it will just dump you back at the command line instantly. Because of this, using grep is just an extra unneeded step.
The only time I can see actually needing a grep process in place is when you're running multiple instances of Domino on the same box. Even then, it can be done without grep.
I like the idea of using a pid file, that's got to be the quickest, cleanest way to 'test' the running process, I'm just not quite sure how to do it even though it's not entirely necessary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.