I work on IBM TWS ( Tivoli Workload Scheduler ) administration. I have placed TWS service stop and start script under directory /etc/init.d/ in my Linux server and coded email alert when the script has been executed with stop or start parameter .
I am receiving email notification only when start parameter has been passed to script after server reboot.
But I also expect email notification when server gets shutdown. Meaning when stop parameter passed to the script I am not receiving the email.
After analyzing the situation I found sendmail service is getting stopped before TWS service stop script executed.
Is there any way I could prioritize the execution of TWS service stop script before send mail function killed/stopped during the server shutdown.
And start the sendmail before start parameter passed to the TWS service script.
Do you have /etc/init.d/sendmail? (Alternatives to sendmail are postfix, qmail, exim, ...)
/etc/init.d/sendmail does not have an LSB header that describes services and dependency.
Then try to manually change the kill script order.
Say your service script is /etc/init.d/tws then list the kill order with
And rename the K*tws to a number that is little lower than the K*sendmail number!
For example there is /etc/rc.d/rc0.d/K30sendmail and /etc/rc.d/rc0.d/K40tws:
Do this also for the other run levels rc1.d, rc2.d, ...
Attention: there can be other dependencies with other services, so this needs to be tested!
Last but not least, even if the kill order is correct it could be that sendmail is killed before it can deliver the E-mail.
E.g. it has queued the mail but then it is killed. Then it will deliver the mail when it is started again (e.g. when the system boots up).
Last edited by MadeInGermany; 03-27-2015 at 09:15 AM..
One of our VM machines mysteriously went read-only overnight and as it wasn't being used, thought it would be a good idea to reboot the machine and run fsck on boot, well. . . .. things didn't quite work out that way lol :)
Anyway, the machine booted up, but mysteriously had no hostname set,... (2 Replies)
Why not just init? What do /etc/rc*.* scripts, rc*.*d and init*.*d directories and directory trees, etc (ex like svc, startsrc, and on and on) do that init and inittab do not or could not do? Is it just so novice SysAdmins need not mess with init?
Is there an overview anyplace of how start-up... (4 Replies)
I encountered a problem on one of our database servers.
OS: CentOS 5.5 final
Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel)
We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Hi,
I am experiencing a weird thing on my SUNFIRE machine with Solaris 9 OS.
When I do init 0 to shutdown the machine to go to ok prompt, what it did was shutdown and reboot like an init 6 command do. I did check the corresponding rc scripts that were involved with init 0 and compared with rc... (2 Replies)
In the olden days it used to be /etc/inittab.
Then it got changed to /etc/event.d/tty* under Fedora 10.
Can someone please point out what it is now in Fedora 13? I want to run mgetty which I had configured in Fedora 10 as /etc/event.d/ppp0:
# modem - getty
#
# This service maintains a... (1 Reply)
Dear all,
I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel):
1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins
So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Hi Expert,
I have encountered some problem with my SUN system. Everytime when i issue command #init 6 OR #init 0 it just logout and prompt for login again instead of rebooting the server when run init 6 and system shutdown when run init 0..
I can only reboot the system using reboot ... Was... (6 Replies)