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:
- # setup sms daemon
- sm:345:respawn:/usr/local/bin/smsd.sh
now contents of /usr/local/bin/smsd.sh script follows:
now dont have /etc/inittab directory in ubuntu 11.04
- #!/bin/sh
- export lang=en_us
- /usr/bin/gammu smsd mysql /etc/smsdrc
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:
- # smsd
- #
- # service maintains sms daemon point system is
- # started until shut down again.
- start on runlevel 3
- start on runlevel 4
- start on runlevel 5
- stop on runlevel 0
- stop on runlevel 1
- stop on runlevel 2
- stop on runlevel 6
- respawn
- 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
Post a Comment