View previous topic :: View next topic |
Author |
Message |
Nar n00b
Joined: 27 May 2002 Posts: 49 Location: Sandton, South Africa
|
Posted: Tue Oct 15, 2002 6:01 am Post subject: rc-script howto for domino |
|
|
Hi Gentoores
I need to wright a rc-script for my domino server. I have got some ideas but are new to rc-scripts. What I need is the following:
* Need to start domino server as user "notes".
* It would be nice if I can re-attach later to the console running domino useing "screen".
* Also need to forcefully kill domino if it misbehave. Domino spawn alot of proceses. 150 upwards So we need to kill all the proceses.
To start domino:
notes@domino notesdata $ /opt/lotus/bin/server
To stop domino:
notes@domino notesdata $ /opt/lotus/bin/server -q
Any ideas ?
Thanks
Nar |
|
Back to top |
|
|
Nar n00b
Joined: 27 May 2002 Posts: 49 Location: Sandton, South Africa
|
Posted: Tue Oct 15, 2002 11:19 am Post subject: |
|
|
What about this ? It is working but it is not fery nice. Just straight forward
Code: | domino_server init.d # cat domino
#!/sbin/runscript
depend() {
need net
}
start() {
ebegin "Starting Domino on STINGRAY"
cd /home/notes/notesdata/
echo "screen -dm -c screenrc" | su notes
eend $? "Failed to start Domino on STINGRAY"
}
stop() {
ebegin "Stopping Domino on STINGRAY"
echo "... waiting for shutdown to complete"
su - notes -c "cd /home/notes/notesdata/; /opt/lotus/bin/server -q &"
su - notes -c "screen -X kill &"
sleep 10
eend $? "Failed to stop Domino on STINGRAY"
} |
Can I improve ??
Also How do I stop the domino script first when I reboot the server ?
Thanks
Nar |
|
Back to top |
|
|
|