The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shutdown script kingsto88 HP-UX 0 03-20-2007 08:43 PM
A script for shutdown kelu UNIX for Dummies Questions & Answers 12 08-23-2006 10:09 PM
Shutdown script alpha_manic UNIX for Advanced & Expert Users 10 09-14-2005 05:14 PM
remote shutdown script soliberus Shell Programming and Scripting 2 01-31-2005 06:46 PM
logout/shutdown script ropers UNIX for Dummies Questions & Answers 1 08-02-2002 03:05 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-19-2008
eliraza6 eliraza6 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 56
Shutdown Script not executing...

Hi all...
I have a problem...
I wrote a small daemon for my server to start\stop the application...

Code:
#!/bin/bash
#
# eaid        Startup script for the EAI Application
#
# chkconfig: 234 99 4
# description: Saves and restores system entropy pool for \
#              higher quality random number generation.

. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/eaid ]; then
        . /etc/sysconfig/eaid
fi

# This are the conditions of the action

start() {
         su - tibprod -c "updown_ems.sh up"
         su - tibprod -c "updown_rvrd.sh up"
         su - tibprod -c "updown_rva.sh up"
         su - tibprod -c "updown_hawk.sh up"
         su - tibprod -c "updown_admin.sh up"
        }
stop()  {
         #su - tibprod -c "updown_admin.sh down"
         #su - tibprod -c "updown_hawk.sh down"
         #su - tibprod -c "updown_rva.sh down"
         #su - tibprod -c "updown_rvrd.sh  down"
         su - tibprod -c "updown_ems.sh down"
        }

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  *)
        echo $"Usage: $prog {start|stop}"
        exit 1
esac

exit $RETVAL
then i have added it by chkconfig --add eaid
and now i can see this:
Code:
chkconfig --list eaid
eaid            0:off   1:off   2:on    3:on    4:on    5:off   6:off
but...
then i'm looking at my /var/log/boot.log
i can see that the script is running then the computer starts but i cannot see that it's running the stop function when the computer is shutting down...
although i can see the "K" script on rc6.d...

what have i done wrong?

thanks for the help!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0