Results 1 to 2 of 2

Thread: No /etc/inittab in 11.04 where to put?

  1. #1
    Join Date
    Jul 2011

    No /etc/inittab in 11.04 where to put?

    Hi all,

    Im following a guide on setting up 2 way text messaging through MYSQL and Nagios.

    However i have come a little unstuck and my newb linux knowledge has run out!

    Guide states:

    Now we need to start the daemon. This daemon controls storing the messages in the backend database, as well as sending the message.

    Ideally we want the SMS Daemon to restart whenever it stops. We can accomplish this by using an entry in the /etc/inittab. Here is what my entry reads:

    1. # Setup the SMS Daemon
    2. sm:345:respawn:/usr/local/bin/

    Now the contents of the /usr/local/bin/ script are as follows:

    1. #!/bin/sh
    2. export LANG=en_US
    3. /usr/bin/gammu smsd MYSQL /etc/smsdrc

    Now i dont have the /etc/inittab directory in Ubuntu 11.04

    It then goes on to say:

    If you don't have an /etc/inittab file you may be running upstart. If that's the case, you can create a file (say smsd) and place it in the /etc/event.d/ directory.

    It would look like:

    1. # smsd
    2. #
    3. # This service maintains the SMS Daemon from the point the system is
    4. # started until it is shut down again.
    5. start on runlevel 3
    6. start on runlevel 4
    7. start on runlevel 5
    8. stop on runlevel 0
    9. stop on runlevel 1
    10. stop on runlevel 2
    11. stop on runlevel 6
    12. respawn
    13. exec /usr/local/bin/

    Now i dont have an event.d directory either!

    So i found this link

    And put the script in /usr/local/bin and entered the info in as in the script above.

    Then i put the above text in blue into a file called smsd and put that into /etc/init.d

    However when i try to start the Daemon using the command in the guide
    Those using upstart can use sudo /sbin/initctl start smsd to control the SMS deamon. Check it's running using sudo /sbin/initctl status smsd.

    it throws and output of - initctl: Unknown job: smsd

    I have noticed that most other files in the init.d directory are shell scritps where as mine just shows up as a text document!?

    Can anybody tell me where i am going wrong and give me my linux lesson for the day?

    Thankyou in advance for any time given.

  2. #2
    Join Date
    Jul 2011

    Re: No /etc/inittab in 11.04 where to put?

    ok progress

    following this thread on here

    I am now in the same situation as the OP started in

    My job now starts but upon running sudo /sbin/initctl status smsd gives me :
    smsd stop/waiting

    Is this designed behaviour as i dont really follow from the end of the post if it is or not?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts