How to auto reboot after a modem failure?

Discussion in 'General' started by johnme, Jul 6, 2009.

  1. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    Hello

    I'm having a problem with the folowing message...
    ---------------------------------------------------------------------
    subject: modem on /dev/ttyIAX1 appears wedged
    The HylaFAX software thinks that there is a problem with the modem
    on device /dev/ttyIAX1 that needs attention; repeated attempts to
    initialize the modem have failed.

    Consult the server trace logs for more information on what is happening.

    You will be notified again after 5 minutes if the problem persists.
    ---------------------------------------------------------------------
    The problem is solved when i do a reboot of the elastix server.
    So can you help me?
    I need a command to auto reboot elastix after an error like that.
    I'm using this elastix only as a fax server, so there will be no problem if we do
    a reboot with the users.

    Thank's
    John
     
  2. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    Hello

    I tried something else.

    If i run from console this command then the iaxmodems are alive again

    /etc/rc.d/init.d/iaxmodem restart

    I tried to put it as a cron job but it seem that it don't work

    In /etc/cron.hourly i create a file and put in it:


    #!/bin/sh
    /etc/rc.d/init.d/iaxmodem restart

    The question is, is that script like it should be?
     
  3. gamba47

    Joined:
    May 28, 2009
    Messages:
    595
    Likes Received:
    0
    You need to find a way to detect this problem in console mode.

    Where is the first place who advice you about this problem. Ex. it´s a log ? which ?

    gamba47
     
  4. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    Hello

    The fax master is sending mail for errors.
    Thats the way i was reported the problem.

    John
     
  5. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    from

    man wedged

    (wedged is the script that hylafax runs when there is a problem, it is /var/spool/hylafax/bin/wedged)

    .
    .
    .
    If there exists an executable file /var/spool/hylafax/etc/resetmodem then that file will be executed upon execution of the wedged
    script in an effort to recover the modem.

    .
    .

    Is that any help?

    (wedged is what sends you the emails about being wedged
    /var/spool/hylafax/etc/resetmodem (which can be your cron script, it will just be run only when appropriate) should be made executable by uucp (the hylafax user))
     

Share This Page