Skip to main content

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


hi all,

im following guide on setting 2 way text messaging through mysql , nagios.

have come little unstuck , newb linux knowledge has run out!

guide states:

need start daemon. daemon controls storing messages in backend database, sending message.

ideally want sms daemon restart whenever stops. can accomplish using entry in /etc/inittab. here entry reads:

  1. # setup sms daemon
  2. sm:345:respawn:/usr/local/bin/smsd.sh

now contents of /usr/local/bin/smsd.sh script follows:

  1. #!/bin/sh
  2. export lang=en_us
  3. /usr/bin/gammu smsd mysql /etc/smsdrc



now dont have /etc/inittab directory in ubuntu 11.04


it goes on say:


if don't have /etc/inittab file may running upstart. if that's case, can create file (say smsd) , place in /etc/event.d/ directory.

like:


  1. # smsd
  2. #
  3. # service maintains sms daemon point system is
  4. # started until 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/smsd.sh

dont have event.d directory either!


found link
https://help.ubuntu.com/community/upstarthowto


, put script in /usr/local/bin , entered info in in script above.


put above text in blue file called smsd , put /etc/init.d


when try start daemon using command in guide
using upstart can use sudo /sbin/initctl start smsd control sms deamon. check it's running using sudo /sbin/initctl status smsd.


throws , output of - initctl: unknown job: smsd


have noticed other files in init.d directory shell scritps mine shows text document!?



can tell me going wrong , give me linux lesson day?


thankyou in advance time given.





ok progress

following thread on here
http://ubuntuforums.org/showthread.php?t=1320803

in same situation op started in

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

designed behaviour dont follow end of post if or not?


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] No /etc/inittab in 11.04 where to put?


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account